Google Pay Passes API
POST
walletobjects.eventticketclass.addmessage
{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/eventTicketClass/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketClass/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/eventTicketClass/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/eventTicketClass/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.eventticketclass.get
{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/eventTicketClass/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketClass/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/eventTicketClass/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/eventTicketClass/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId
http GET {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.eventticketclass.insert
{{baseUrl}}/walletobjects/v1/eventTicketClass
BODY json
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketClass");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/eventTicketClass" {:content-type :json
:form-params {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:confirmationCodeLabel ""
:countryCode ""
:customConfirmationCodeLabel {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:customGateLabel {}
:customRowLabel {}
:customSeatLabel {}
:customSectionLabel {}
:dateTime {:customDoorsOpenLabel {}
:doorsOpen ""
:doorsOpenLabel ""
:end ""
:kind ""
:start ""}
:enableSmartTap false
:eventId ""
:eventName {}
:finePrint {}
:gateLabel ""
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rowLabel ""
:seatLabel ""
:sectionLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:venue {:address {}
:kind ""
:name {}}
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketClass"),
Content = new StringContent("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketClass");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketClass"
payload := strings.NewReader("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/eventTicketClass HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3567
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/eventTicketClass")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketClass"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/eventTicketClass")
.header("content-type", "application/json")
.body("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/eventTicketClass');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketClass',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass',
headers: {'content-type': 'application/json'},
body: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/eventTicketClass');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"confirmationCodeLabel": @"",
@"countryCode": @"",
@"customConfirmationCodeLabel": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] },
@"customGateLabel": @{ },
@"customRowLabel": @{ },
@"customSeatLabel": @{ },
@"customSectionLabel": @{ },
@"dateTime": @{ @"customDoorsOpenLabel": @{ }, @"doorsOpen": @"", @"doorsOpenLabel": @"", @"end": @"", @"kind": @"", @"start": @"" },
@"enableSmartTap": @NO,
@"eventId": @"",
@"eventName": @{ },
@"finePrint": @{ },
@"gateLabel": @"",
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedIssuerName": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"logo": @{ },
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"rowLabel": @"",
@"seatLabel": @"",
@"sectionLabel": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"venue": @{ @"address": @{ }, @"kind": @"", @"name": @{ } },
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketClass" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketClass",
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([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/eventTicketClass', [
'body' => '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/eventTicketClass", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass"
payload = {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": False,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketClass"
payload <- "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/eventTicketClass') do |req|
req.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketClass";
let payload = json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"customGateLabel": json!({}),
"customRowLabel": json!({}),
"customSeatLabel": json!({}),
"customSectionLabel": json!({}),
"dateTime": json!({
"customDoorsOpenLabel": json!({}),
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
}),
"enableSmartTap": false,
"eventId": "",
"eventName": json!({}),
"finePrint": json!({}),
"gateLabel": "",
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"venue": json!({
"address": json!({}),
"kind": "",
"name": json!({})
}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/eventTicketClass \
--header 'content-type: application/json' \
--data '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http POST {{baseUrl}}/walletobjects/v1/eventTicketClass \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketClass
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"customGateLabel": [],
"customRowLabel": [],
"customSeatLabel": [],
"customSectionLabel": [],
"dateTime": [
"customDoorsOpenLabel": [],
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
],
"enableSmartTap": false,
"eventId": "",
"eventName": [],
"finePrint": [],
"gateLabel": "",
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"venue": [
"address": [],
"kind": "",
"name": []
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.eventticketclass.list
{{baseUrl}}/walletobjects/v1/eventTicketClass
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketClass");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/eventTicketClass")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketClass"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketClass");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketClass"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/eventTicketClass HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/eventTicketClass")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketClass"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/eventTicketClass")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/eventTicketClass');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketClass',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/eventTicketClass');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketClass" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketClass",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/eventTicketClass');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/eventTicketClass")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketClass"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/eventTicketClass') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketClass";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/eventTicketClass
http GET {{baseUrl}}/walletobjects/v1/eventTicketClass
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketClass
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.eventticketclass.patch
{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId" {:content-type :json
:form-params {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:confirmationCodeLabel ""
:countryCode ""
:customConfirmationCodeLabel {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:customGateLabel {}
:customRowLabel {}
:customSeatLabel {}
:customSectionLabel {}
:dateTime {:customDoorsOpenLabel {}
:doorsOpen ""
:doorsOpenLabel ""
:end ""
:kind ""
:start ""}
:enableSmartTap false
:eventId ""
:eventName {}
:finePrint {}
:gateLabel ""
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rowLabel ""
:seatLabel ""
:sectionLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:venue {:address {}
:kind ""
:name {}}
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"),
Content = new StringContent("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
payload := strings.NewReader("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/eventTicketClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3567
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"confirmationCodeLabel": @"",
@"countryCode": @"",
@"customConfirmationCodeLabel": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] },
@"customGateLabel": @{ },
@"customRowLabel": @{ },
@"customSeatLabel": @{ },
@"customSectionLabel": @{ },
@"dateTime": @{ @"customDoorsOpenLabel": @{ }, @"doorsOpen": @"", @"doorsOpenLabel": @"", @"end": @"", @"kind": @"", @"start": @"" },
@"enableSmartTap": @NO,
@"eventId": @"",
@"eventName": @{ },
@"finePrint": @{ },
@"gateLabel": @"",
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedIssuerName": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"logo": @{ },
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"rowLabel": @"",
@"seatLabel": @"",
@"sectionLabel": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"venue": @{ @"address": @{ }, @"kind": @"", @"name": @{ } },
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId', [
'body' => '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/eventTicketClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
payload = {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": False,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
payload <- "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/eventTicketClass/:resourceId') do |req|
req.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId";
let payload = json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"customGateLabel": json!({}),
"customRowLabel": json!({}),
"customSeatLabel": json!({}),
"customSectionLabel": json!({}),
"dateTime": json!({
"customDoorsOpenLabel": json!({}),
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
}),
"enableSmartTap": false,
"eventId": "",
"eventName": json!({}),
"finePrint": json!({}),
"gateLabel": "",
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"venue": json!({
"address": json!({}),
"kind": "",
"name": json!({})
}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"customGateLabel": [],
"customRowLabel": [],
"customSeatLabel": [],
"customSectionLabel": [],
"dateTime": [
"customDoorsOpenLabel": [],
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
],
"enableSmartTap": false,
"eventId": "",
"eventName": [],
"finePrint": [],
"gateLabel": "",
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"venue": [
"address": [],
"kind": "",
"name": []
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.eventticketclass.update
{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId" {:content-type :json
:form-params {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:confirmationCodeLabel ""
:countryCode ""
:customConfirmationCodeLabel {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:customGateLabel {}
:customRowLabel {}
:customSeatLabel {}
:customSectionLabel {}
:dateTime {:customDoorsOpenLabel {}
:doorsOpen ""
:doorsOpenLabel ""
:end ""
:kind ""
:start ""}
:enableSmartTap false
:eventId ""
:eventName {}
:finePrint {}
:gateLabel ""
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rowLabel ""
:seatLabel ""
:sectionLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:venue {:address {}
:kind ""
:name {}}
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"),
Content = new StringContent("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
payload := strings.NewReader("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/eventTicketClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3567
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"confirmationCodeLabel": @"",
@"countryCode": @"",
@"customConfirmationCodeLabel": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] },
@"customGateLabel": @{ },
@"customRowLabel": @{ },
@"customSeatLabel": @{ },
@"customSectionLabel": @{ },
@"dateTime": @{ @"customDoorsOpenLabel": @{ }, @"doorsOpen": @"", @"doorsOpenLabel": @"", @"end": @"", @"kind": @"", @"start": @"" },
@"enableSmartTap": @NO,
@"eventId": @"",
@"eventName": @{ },
@"finePrint": @{ },
@"gateLabel": @"",
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedIssuerName": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"logo": @{ },
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"rowLabel": @"",
@"seatLabel": @"",
@"sectionLabel": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"venue": @{ @"address": @{ }, @"kind": @"", @"name": @{ } },
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId",
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([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId', [
'body' => '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/eventTicketClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
payload = {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": False,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId"
payload <- "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/eventTicketClass/:resourceId') do |req|
req.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId";
let payload = json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"customGateLabel": json!({}),
"customRowLabel": json!({}),
"customSeatLabel": json!({}),
"customSectionLabel": json!({}),
"dateTime": json!({
"customDoorsOpenLabel": json!({}),
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
}),
"enableSmartTap": false,
"eventId": "",
"eventName": json!({}),
"finePrint": json!({}),
"gateLabel": "",
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"venue": json!({
"address": json!({}),
"kind": "",
"name": json!({})
}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PUT {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"customGateLabel": [],
"customRowLabel": [],
"customSeatLabel": [],
"customSectionLabel": [],
"dateTime": [
"customDoorsOpenLabel": [],
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
],
"enableSmartTap": false,
"eventId": "",
"eventName": [],
"finePrint": [],
"gateLabel": "",
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"venue": [
"address": [],
"kind": "",
"name": []
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.eventticketobject.addmessage
{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/eventTicketObject/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketObject/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/eventTicketObject/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/eventTicketObject/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.eventticketobject.get
{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/eventTicketObject/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketObject/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/eventTicketObject/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/eventTicketObject/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId
http GET {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.eventticketobject.insert
{{baseUrl}}/walletobjects/v1/eventTicketObject
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketObject");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/eventTicketObject" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:confirmationCodeLabel ""
:countryCode ""
:customConfirmationCodeLabel {}
:customGateLabel {}
:customRowLabel {}
:customSeatLabel {}
:customSectionLabel {}
:dateTime {:customDoorsOpenLabel {}
:doorsOpen ""
:doorsOpenLabel ""
:end ""
:kind ""
:start ""}
:enableSmartTap false
:eventId ""
:eventName {}
:finePrint {}
:gateLabel ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rowLabel ""
:seatLabel ""
:sectionLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:venue {:address {}
:kind ""
:name {}}
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:faceValue {:currencyCode ""
:kind ""
:micros ""}
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linkedOfferIds []
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:reservationInfo {:confirmationCode ""
:kind ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:seatInfo {:gate {}
:kind ""
:row {}
:seat {}
:section {}}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:ticketHolderName ""
:ticketNumber ""
:ticketType {}
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketObject"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketObject");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketObject"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/eventTicketObject HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5666
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/eventTicketObject")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketObject"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/eventTicketObject")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
reservationInfo: {
confirmationCode: '',
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
seatInfo: {
gate: {},
kind: '',
row: {},
seat: {},
section: {}
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/eventTicketObject');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"faceValue":{"currencyCode":"","kind":"","micros":""},"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"reservationInfo":{"confirmationCode":"","kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"seatInfo":{"gate":{},"kind":"","row":{},"seat":{},"section":{}},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketHolderName":"","ticketNumber":"","ticketType":{},"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {},\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "reservationInfo": {\n "confirmationCode": "",\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "seatInfo": {\n "gate": {},\n "kind": "",\n "row": {},\n "seat": {},\n "section": {}\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketHolderName": "",\n "ticketNumber": "",\n "ticketType": {},\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketObject',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/eventTicketObject');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
reservationInfo: {
confirmationCode: '',
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
seatInfo: {
gate: {},
kind: '',
row: {},
seat: {},
section: {}
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"faceValue":{"currencyCode":"","kind":"","micros":""},"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"reservationInfo":{"confirmationCode":"","kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"seatInfo":{"gate":{},"kind":"","row":{},"seat":{},"section":{}},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketHolderName":"","ticketNumber":"","ticketType":{},"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"confirmationCodeLabel": @"", @"countryCode": @"", @"customConfirmationCodeLabel": @{ }, @"customGateLabel": @{ }, @"customRowLabel": @{ }, @"customSeatLabel": @{ }, @"customSectionLabel": @{ }, @"dateTime": @{ @"customDoorsOpenLabel": @{ }, @"doorsOpen": @"", @"doorsOpenLabel": @"", @"end": @"", @"kind": @"", @"start": @"" }, @"enableSmartTap": @NO, @"eventId": @"", @"eventName": @{ }, @"finePrint": @{ }, @"gateLabel": @"", @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedIssuerName": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"logo": @{ }, @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"rowLabel": @"", @"seatLabel": @"", @"sectionLabel": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"venue": @{ @"address": @{ }, @"kind": @"", @"name": @{ } }, @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"faceValue": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" },
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linkedOfferIds": @[ ],
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"reservationInfo": @{ @"confirmationCode": @"", @"kind": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"seatInfo": @{ @"gate": @{ }, @"kind": @"", @"row": @{ }, @"seat": @{ }, @"section": @{ } },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"ticketHolderName": @"",
@"ticketNumber": @"",
@"ticketType": @{ },
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketObject" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketObject",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'reservationInfo' => [
'confirmationCode' => '',
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'seatInfo' => [
'gate' => [
],
'kind' => '',
'row' => [
],
'seat' => [
],
'section' => [
]
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketHolderName' => '',
'ticketNumber' => '',
'ticketType' => [
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/eventTicketObject', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'reservationInfo' => [
'confirmationCode' => '',
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'seatInfo' => [
'gate' => [
],
'kind' => '',
'row' => [
],
'seat' => [
],
'section' => [
]
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketHolderName' => '',
'ticketNumber' => '',
'ticketType' => [
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'reservationInfo' => [
'confirmationCode' => '',
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'seatInfo' => [
'gate' => [
],
'kind' => '',
'row' => [
],
'seat' => [
],
'section' => [
]
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketHolderName' => '',
'ticketNumber' => '',
'ticketType' => [
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/eventTicketObject", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": False,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketObject"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/eventTicketObject') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketObject";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": json!({}),
"customGateLabel": json!({}),
"customRowLabel": json!({}),
"customSeatLabel": json!({}),
"customSectionLabel": json!({}),
"dateTime": json!({
"customDoorsOpenLabel": json!({}),
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
}),
"enableSmartTap": false,
"eventId": "",
"eventName": json!({}),
"finePrint": json!({}),
"gateLabel": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"venue": json!({
"address": json!({}),
"kind": "",
"name": json!({})
}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"faceValue": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linkedOfferIds": (),
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"reservationInfo": json!({
"confirmationCode": "",
"kind": ""
}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"seatInfo": json!({
"gate": json!({}),
"kind": "",
"row": json!({}),
"seat": json!({}),
"section": json!({})
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": json!({}),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/eventTicketObject \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}' | \
http POST {{baseUrl}}/walletobjects/v1/eventTicketObject \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {},\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "reservationInfo": {\n "confirmationCode": "",\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "seatInfo": {\n "gate": {},\n "kind": "",\n "row": {},\n "seat": {},\n "section": {}\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketHolderName": "",\n "ticketNumber": "",\n "ticketType": {},\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketObject
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": [],
"customGateLabel": [],
"customRowLabel": [],
"customSeatLabel": [],
"customSectionLabel": [],
"dateTime": [
"customDoorsOpenLabel": [],
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
],
"enableSmartTap": false,
"eventId": "",
"eventName": [],
"finePrint": [],
"gateLabel": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"venue": [
"address": [],
"kind": "",
"name": []
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"faceValue": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linkedOfferIds": [],
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"reservationInfo": [
"confirmationCode": "",
"kind": ""
],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"seatInfo": [
"gate": [],
"kind": "",
"row": [],
"seat": [],
"section": []
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": [],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.eventticketobject.list
{{baseUrl}}/walletobjects/v1/eventTicketObject
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketObject");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/eventTicketObject")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketObject"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketObject");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketObject"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/eventTicketObject HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/eventTicketObject")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketObject"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/eventTicketObject")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/eventTicketObject');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketObject',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/eventTicketObject');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketObject" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketObject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/eventTicketObject');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/eventTicketObject")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketObject"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/eventTicketObject') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketObject";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/eventTicketObject
http GET {{baseUrl}}/walletobjects/v1/eventTicketObject
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketObject
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.eventticketobject.modifylinkedofferobjects
{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects
QUERY PARAMS
resourceId
BODY json
{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects" {:content-type :json
:form-params {:linkedOfferObjectIds {:addLinkedOfferObjectIds []
:removeLinkedOfferObjectIds []}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects"),
Content = new StringContent("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects"
payload := strings.NewReader("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 107
{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects")
.setHeader("content-type", "application/json")
.setBody("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects")
.header("content-type", "application/json")
.body("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}")
.asString();
const data = JSON.stringify({
linkedOfferObjectIds: {
addLinkedOfferObjectIds: [],
removeLinkedOfferObjectIds: []
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects',
headers: {'content-type': 'application/json'},
data: {
linkedOfferObjectIds: {addLinkedOfferObjectIds: [], removeLinkedOfferObjectIds: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"linkedOfferObjectIds":{"addLinkedOfferObjectIds":[],"removeLinkedOfferObjectIds":[]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "linkedOfferObjectIds": {\n "addLinkedOfferObjectIds": [],\n "removeLinkedOfferObjectIds": []\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
linkedOfferObjectIds: {addLinkedOfferObjectIds: [], removeLinkedOfferObjectIds: []}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects',
headers: {'content-type': 'application/json'},
body: {
linkedOfferObjectIds: {addLinkedOfferObjectIds: [], removeLinkedOfferObjectIds: []}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
linkedOfferObjectIds: {
addLinkedOfferObjectIds: [],
removeLinkedOfferObjectIds: []
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects',
headers: {'content-type': 'application/json'},
data: {
linkedOfferObjectIds: {addLinkedOfferObjectIds: [], removeLinkedOfferObjectIds: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"linkedOfferObjectIds":{"addLinkedOfferObjectIds":[],"removeLinkedOfferObjectIds":[]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"linkedOfferObjectIds": @{ @"addLinkedOfferObjectIds": @[ ], @"removeLinkedOfferObjectIds": @[ ] } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects",
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([
'linkedOfferObjectIds' => [
'addLinkedOfferObjectIds' => [
],
'removeLinkedOfferObjectIds' => [
]
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects', [
'body' => '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'linkedOfferObjectIds' => [
'addLinkedOfferObjectIds' => [
],
'removeLinkedOfferObjectIds' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'linkedOfferObjectIds' => [
'addLinkedOfferObjectIds' => [
],
'removeLinkedOfferObjectIds' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects"
payload = { "linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects"
payload <- "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects') do |req|
req.body = "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects";
let payload = json!({"linkedOfferObjectIds": json!({
"addLinkedOfferObjectIds": (),
"removeLinkedOfferObjectIds": ()
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects \
--header 'content-type: application/json' \
--data '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}'
echo '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "linkedOfferObjectIds": {\n "addLinkedOfferObjectIds": [],\n "removeLinkedOfferObjectIds": []\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["linkedOfferObjectIds": [
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId/modifyLinkedOfferObjects")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.eventticketobject.patch
{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:confirmationCodeLabel ""
:countryCode ""
:customConfirmationCodeLabel {}
:customGateLabel {}
:customRowLabel {}
:customSeatLabel {}
:customSectionLabel {}
:dateTime {:customDoorsOpenLabel {}
:doorsOpen ""
:doorsOpenLabel ""
:end ""
:kind ""
:start ""}
:enableSmartTap false
:eventId ""
:eventName {}
:finePrint {}
:gateLabel ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rowLabel ""
:seatLabel ""
:sectionLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:venue {:address {}
:kind ""
:name {}}
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:faceValue {:currencyCode ""
:kind ""
:micros ""}
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linkedOfferIds []
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:reservationInfo {:confirmationCode ""
:kind ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:seatInfo {:gate {}
:kind ""
:row {}
:seat {}
:section {}}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:ticketHolderName ""
:ticketNumber ""
:ticketType {}
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/eventTicketObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5666
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
reservationInfo: {
confirmationCode: '',
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
seatInfo: {
gate: {},
kind: '',
row: {},
seat: {},
section: {}
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"faceValue":{"currencyCode":"","kind":"","micros":""},"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"reservationInfo":{"confirmationCode":"","kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"seatInfo":{"gate":{},"kind":"","row":{},"seat":{},"section":{}},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketHolderName":"","ticketNumber":"","ticketType":{},"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {},\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "reservationInfo": {\n "confirmationCode": "",\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "seatInfo": {\n "gate": {},\n "kind": "",\n "row": {},\n "seat": {},\n "section": {}\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketHolderName": "",\n "ticketNumber": "",\n "ticketType": {},\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
reservationInfo: {
confirmationCode: '',
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
seatInfo: {
gate: {},
kind: '',
row: {},
seat: {},
section: {}
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"faceValue":{"currencyCode":"","kind":"","micros":""},"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"reservationInfo":{"confirmationCode":"","kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"seatInfo":{"gate":{},"kind":"","row":{},"seat":{},"section":{}},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketHolderName":"","ticketNumber":"","ticketType":{},"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"confirmationCodeLabel": @"", @"countryCode": @"", @"customConfirmationCodeLabel": @{ }, @"customGateLabel": @{ }, @"customRowLabel": @{ }, @"customSeatLabel": @{ }, @"customSectionLabel": @{ }, @"dateTime": @{ @"customDoorsOpenLabel": @{ }, @"doorsOpen": @"", @"doorsOpenLabel": @"", @"end": @"", @"kind": @"", @"start": @"" }, @"enableSmartTap": @NO, @"eventId": @"", @"eventName": @{ }, @"finePrint": @{ }, @"gateLabel": @"", @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedIssuerName": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"logo": @{ }, @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"rowLabel": @"", @"seatLabel": @"", @"sectionLabel": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"venue": @{ @"address": @{ }, @"kind": @"", @"name": @{ } }, @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"faceValue": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" },
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linkedOfferIds": @[ ],
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"reservationInfo": @{ @"confirmationCode": @"", @"kind": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"seatInfo": @{ @"gate": @{ }, @"kind": @"", @"row": @{ }, @"seat": @{ }, @"section": @{ } },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"ticketHolderName": @"",
@"ticketNumber": @"",
@"ticketType": @{ },
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'reservationInfo' => [
'confirmationCode' => '',
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'seatInfo' => [
'gate' => [
],
'kind' => '',
'row' => [
],
'seat' => [
],
'section' => [
]
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketHolderName' => '',
'ticketNumber' => '',
'ticketType' => [
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'reservationInfo' => [
'confirmationCode' => '',
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'seatInfo' => [
'gate' => [
],
'kind' => '',
'row' => [
],
'seat' => [
],
'section' => [
]
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketHolderName' => '',
'ticketNumber' => '',
'ticketType' => [
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'reservationInfo' => [
'confirmationCode' => '',
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'seatInfo' => [
'gate' => [
],
'kind' => '',
'row' => [
],
'seat' => [
],
'section' => [
]
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketHolderName' => '',
'ticketNumber' => '',
'ticketType' => [
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/eventTicketObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": False,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/eventTicketObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": json!({}),
"customGateLabel": json!({}),
"customRowLabel": json!({}),
"customSeatLabel": json!({}),
"customSectionLabel": json!({}),
"dateTime": json!({
"customDoorsOpenLabel": json!({}),
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
}),
"enableSmartTap": false,
"eventId": "",
"eventName": json!({}),
"finePrint": json!({}),
"gateLabel": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"venue": json!({
"address": json!({}),
"kind": "",
"name": json!({})
}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"faceValue": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linkedOfferIds": (),
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"reservationInfo": json!({
"confirmationCode": "",
"kind": ""
}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"seatInfo": json!({
"gate": json!({}),
"kind": "",
"row": json!({}),
"seat": json!({}),
"section": json!({})
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": json!({}),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {},\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "reservationInfo": {\n "confirmationCode": "",\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "seatInfo": {\n "gate": {},\n "kind": "",\n "row": {},\n "seat": {},\n "section": {}\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketHolderName": "",\n "ticketNumber": "",\n "ticketType": {},\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": [],
"customGateLabel": [],
"customRowLabel": [],
"customSeatLabel": [],
"customSectionLabel": [],
"dateTime": [
"customDoorsOpenLabel": [],
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
],
"enableSmartTap": false,
"eventId": "",
"eventName": [],
"finePrint": [],
"gateLabel": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"venue": [
"address": [],
"kind": "",
"name": []
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"faceValue": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linkedOfferIds": [],
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"reservationInfo": [
"confirmationCode": "",
"kind": ""
],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"seatInfo": [
"gate": [],
"kind": "",
"row": [],
"seat": [],
"section": []
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": [],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.eventticketobject.update
{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:confirmationCodeLabel ""
:countryCode ""
:customConfirmationCodeLabel {}
:customGateLabel {}
:customRowLabel {}
:customSeatLabel {}
:customSectionLabel {}
:dateTime {:customDoorsOpenLabel {}
:doorsOpen ""
:doorsOpenLabel ""
:end ""
:kind ""
:start ""}
:enableSmartTap false
:eventId ""
:eventName {}
:finePrint {}
:gateLabel ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rowLabel ""
:seatLabel ""
:sectionLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:venue {:address {}
:kind ""
:name {}}
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:faceValue {:currencyCode ""
:kind ""
:micros ""}
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linkedOfferIds []
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:reservationInfo {:confirmationCode ""
:kind ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:seatInfo {:gate {}
:kind ""
:row {}
:seat {}
:section {}}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:ticketHolderName ""
:ticketNumber ""
:ticketType {}
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/eventTicketObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5666
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
reservationInfo: {
confirmationCode: '',
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
seatInfo: {
gate: {},
kind: '',
row: {},
seat: {},
section: {}
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"faceValue":{"currencyCode":"","kind":"","micros":""},"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"reservationInfo":{"confirmationCode":"","kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"seatInfo":{"gate":{},"kind":"","row":{},"seat":{},"section":{}},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketHolderName":"","ticketNumber":"","ticketType":{},"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {},\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "reservationInfo": {\n "confirmationCode": "",\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "seatInfo": {\n "gate": {},\n "kind": "",\n "row": {},\n "seat": {},\n "section": {}\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketHolderName": "",\n "ticketNumber": "",\n "ticketType": {},\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/eventTicketObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
venue: {
address: {},
kind: '',
name: {}
},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
reservationInfo: {
confirmationCode: '',
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
seatInfo: {
gate: {},
kind: '',
row: {},
seat: {},
section: {}
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
confirmationCodeLabel: '',
countryCode: '',
customConfirmationCodeLabel: {},
customGateLabel: {},
customRowLabel: {},
customSeatLabel: {},
customSectionLabel: {},
dateTime: {
customDoorsOpenLabel: {},
doorsOpen: '',
doorsOpenLabel: '',
end: '',
kind: '',
start: ''
},
enableSmartTap: false,
eventId: '',
eventName: {},
finePrint: {},
gateLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rowLabel: '',
seatLabel: '',
sectionLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
venue: {address: {}, kind: '', name: {}},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
faceValue: {currencyCode: '', kind: '', micros: ''},
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
reservationInfo: {confirmationCode: '', kind: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
seatInfo: {gate: {}, kind: '', row: {}, seat: {}, section: {}},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketHolderName: '',
ticketNumber: '',
ticketType: {},
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"confirmationCodeLabel":"","countryCode":"","customConfirmationCodeLabel":{},"customGateLabel":{},"customRowLabel":{},"customSeatLabel":{},"customSectionLabel":{},"dateTime":{"customDoorsOpenLabel":{},"doorsOpen":"","doorsOpenLabel":"","end":"","kind":"","start":""},"enableSmartTap":false,"eventId":"","eventName":{},"finePrint":{},"gateLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rowLabel":"","seatLabel":"","sectionLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"venue":{"address":{},"kind":"","name":{}},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"faceValue":{"currencyCode":"","kind":"","micros":""},"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"reservationInfo":{"confirmationCode":"","kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"seatInfo":{"gate":{},"kind":"","row":{},"seat":{},"section":{}},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketHolderName":"","ticketNumber":"","ticketType":{},"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"confirmationCodeLabel": @"", @"countryCode": @"", @"customConfirmationCodeLabel": @{ }, @"customGateLabel": @{ }, @"customRowLabel": @{ }, @"customSeatLabel": @{ }, @"customSectionLabel": @{ }, @"dateTime": @{ @"customDoorsOpenLabel": @{ }, @"doorsOpen": @"", @"doorsOpenLabel": @"", @"end": @"", @"kind": @"", @"start": @"" }, @"enableSmartTap": @NO, @"eventId": @"", @"eventName": @{ }, @"finePrint": @{ }, @"gateLabel": @"", @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedIssuerName": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"logo": @{ }, @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"rowLabel": @"", @"seatLabel": @"", @"sectionLabel": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"venue": @{ @"address": @{ }, @"kind": @"", @"name": @{ } }, @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"faceValue": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" },
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linkedOfferIds": @[ ],
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"reservationInfo": @{ @"confirmationCode": @"", @"kind": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"seatInfo": @{ @"gate": @{ }, @"kind": @"", @"row": @{ }, @"seat": @{ }, @"section": @{ } },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"ticketHolderName": @"",
@"ticketNumber": @"",
@"ticketType": @{ },
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'reservationInfo' => [
'confirmationCode' => '',
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'seatInfo' => [
'gate' => [
],
'kind' => '',
'row' => [
],
'seat' => [
],
'section' => [
]
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketHolderName' => '',
'ticketNumber' => '',
'ticketType' => [
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'reservationInfo' => [
'confirmationCode' => '',
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'seatInfo' => [
'gate' => [
],
'kind' => '',
'row' => [
],
'seat' => [
],
'section' => [
]
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketHolderName' => '',
'ticketNumber' => '',
'ticketType' => [
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'confirmationCodeLabel' => '',
'countryCode' => '',
'customConfirmationCodeLabel' => [
],
'customGateLabel' => [
],
'customRowLabel' => [
],
'customSeatLabel' => [
],
'customSectionLabel' => [
],
'dateTime' => [
'customDoorsOpenLabel' => [
],
'doorsOpen' => '',
'doorsOpenLabel' => '',
'end' => '',
'kind' => '',
'start' => ''
],
'enableSmartTap' => null,
'eventId' => '',
'eventName' => [
],
'finePrint' => [
],
'gateLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rowLabel' => '',
'seatLabel' => '',
'sectionLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'venue' => [
'address' => [
],
'kind' => '',
'name' => [
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'reservationInfo' => [
'confirmationCode' => '',
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'seatInfo' => [
'gate' => [
],
'kind' => '',
'row' => [
],
'seat' => [
],
'section' => [
]
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketHolderName' => '',
'ticketNumber' => '',
'ticketType' => [
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/eventTicketObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": False,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/eventTicketObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"confirmationCodeLabel\": \"\",\n \"countryCode\": \"\",\n \"customConfirmationCodeLabel\": {},\n \"customGateLabel\": {},\n \"customRowLabel\": {},\n \"customSeatLabel\": {},\n \"customSectionLabel\": {},\n \"dateTime\": {\n \"customDoorsOpenLabel\": {},\n \"doorsOpen\": \"\",\n \"doorsOpenLabel\": \"\",\n \"end\": \"\",\n \"kind\": \"\",\n \"start\": \"\"\n },\n \"enableSmartTap\": false,\n \"eventId\": \"\",\n \"eventName\": {},\n \"finePrint\": {},\n \"gateLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rowLabel\": \"\",\n \"seatLabel\": \"\",\n \"sectionLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"venue\": {\n \"address\": {},\n \"kind\": \"\",\n \"name\": {}\n },\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"seatInfo\": {\n \"gate\": {},\n \"kind\": \"\",\n \"row\": {},\n \"seat\": {},\n \"section\": {}\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketHolderName\": \"\",\n \"ticketNumber\": \"\",\n \"ticketType\": {},\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": json!({}),
"customGateLabel": json!({}),
"customRowLabel": json!({}),
"customSeatLabel": json!({}),
"customSectionLabel": json!({}),
"dateTime": json!({
"customDoorsOpenLabel": json!({}),
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
}),
"enableSmartTap": false,
"eventId": "",
"eventName": json!({}),
"finePrint": json!({}),
"gateLabel": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"venue": json!({
"address": json!({}),
"kind": "",
"name": json!({})
}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"faceValue": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linkedOfferIds": (),
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"reservationInfo": json!({
"confirmationCode": "",
"kind": ""
}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"seatInfo": json!({
"gate": json!({}),
"kind": "",
"row": json!({}),
"seat": json!({}),
"section": json!({})
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": json!({}),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": {},
"customGateLabel": {},
"customRowLabel": {},
"customSeatLabel": {},
"customSectionLabel": {},
"dateTime": {
"customDoorsOpenLabel": {},
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
},
"enableSmartTap": false,
"eventId": "",
"eventName": {},
"finePrint": {},
"gateLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"venue": {
"address": {},
"kind": "",
"name": {}
},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"reservationInfo": {
"confirmationCode": "",
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"seatInfo": {
"gate": {},
"kind": "",
"row": {},
"seat": {},
"section": {}
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": {},
"validTimeInterval": {},
"version": ""
}' | \
http PUT {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "confirmationCodeLabel": "",\n "countryCode": "",\n "customConfirmationCodeLabel": {},\n "customGateLabel": {},\n "customRowLabel": {},\n "customSeatLabel": {},\n "customSectionLabel": {},\n "dateTime": {\n "customDoorsOpenLabel": {},\n "doorsOpen": "",\n "doorsOpenLabel": "",\n "end": "",\n "kind": "",\n "start": ""\n },\n "enableSmartTap": false,\n "eventId": "",\n "eventName": {},\n "finePrint": {},\n "gateLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rowLabel": "",\n "seatLabel": "",\n "sectionLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "venue": {\n "address": {},\n "kind": "",\n "name": {}\n },\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "reservationInfo": {\n "confirmationCode": "",\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "seatInfo": {\n "gate": {},\n "kind": "",\n "row": {},\n "seat": {},\n "section": {}\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketHolderName": "",\n "ticketNumber": "",\n "ticketType": {},\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"confirmationCodeLabel": "",
"countryCode": "",
"customConfirmationCodeLabel": [],
"customGateLabel": [],
"customRowLabel": [],
"customSeatLabel": [],
"customSectionLabel": [],
"dateTime": [
"customDoorsOpenLabel": [],
"doorsOpen": "",
"doorsOpenLabel": "",
"end": "",
"kind": "",
"start": ""
],
"enableSmartTap": false,
"eventId": "",
"eventName": [],
"finePrint": [],
"gateLabel": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rowLabel": "",
"seatLabel": "",
"sectionLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"venue": [
"address": [],
"kind": "",
"name": []
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"faceValue": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linkedOfferIds": [],
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"reservationInfo": [
"confirmationCode": "",
"kind": ""
],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"seatInfo": [
"gate": [],
"kind": "",
"row": [],
"seat": [],
"section": []
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"ticketHolderName": "",
"ticketNumber": "",
"ticketType": [],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/eventTicketObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.flightclass.addmessage
{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/flightClass/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightClass/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/flightClass/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/flightClass/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.flightclass.get
{{baseUrl}}/walletobjects/v1/flightClass/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/flightClass/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightClass/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/flightClass/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/flightClass/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/flightClass/:resourceId
http GET {{baseUrl}}/walletobjects/v1/flightClass/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightClass/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.flightclass.insert
{{baseUrl}}/walletobjects/v1/flightClass
BODY json
{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightClass");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/flightClass" {:content-type :json
:form-params {:allowMultipleUsersPerObject false
:boardingAndSeatingPolicy {:boardingPolicy ""
:kind ""
:seatClassPolicy ""}
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:destination {:airportIataCode ""
:airportNameOverride {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:gate ""
:kind ""
:terminal ""}
:enableSmartTap false
:flightHeader {:carrier {:airlineAllianceLogo {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:airlineLogo {}
:airlineName {}
:carrierIataCode ""
:carrierIcaoCode ""
:kind ""}
:flightNumber ""
:flightNumberDisplayOverride ""
:kind ""
:operatingCarrier {}
:operatingFlightNumber ""}
:flightStatus ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localBoardingDateTime ""
:localEstimatedOrActualArrivalDateTime ""
:localEstimatedOrActualDepartureDateTime ""
:localGateClosingDateTime ""
:localScheduledArrivalDateTime ""
:localScheduledDepartureDateTime ""
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:origin {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightClass"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightClass"),
Content = new StringContent("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightClass");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightClass"
payload := strings.NewReader("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/flightClass HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3976
{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/flightClass")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightClass"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/flightClass")
.header("content-type", "application/json")
.body("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/flightClass');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightClass',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightClass',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightClass',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightClass',
headers: {'content-type': 'application/json'},
body: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/flightClass');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightClass',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowMultipleUsersPerObject": @NO,
@"boardingAndSeatingPolicy": @{ @"boardingPolicy": @"", @"kind": @"", @"seatClassPolicy": @"" },
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"destination": @{ @"airportIataCode": @"", @"airportNameOverride": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"gate": @"", @"kind": @"", @"terminal": @"" },
@"enableSmartTap": @NO,
@"flightHeader": @{ @"carrier": @{ @"airlineAllianceLogo": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"airlineLogo": @{ }, @"airlineName": @{ }, @"carrierIataCode": @"", @"carrierIcaoCode": @"", @"kind": @"" }, @"flightNumber": @"", @"flightNumberDisplayOverride": @"", @"kind": @"", @"operatingCarrier": @{ }, @"operatingFlightNumber": @"" },
@"flightStatus": @"",
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"languageOverride": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localBoardingDateTime": @"",
@"localEstimatedOrActualArrivalDateTime": @"",
@"localEstimatedOrActualDepartureDateTime": @"",
@"localGateClosingDateTime": @"",
@"localScheduledArrivalDateTime": @"",
@"localScheduledDepartureDateTime": @"",
@"localizedIssuerName": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"origin": @{ },
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightClass" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightClass",
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([
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/flightClass', [
'body' => '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightClass');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/flightClass');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/flightClass", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightClass"
payload = {
"allowMultipleUsersPerObject": False,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": False,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightClass"
payload <- "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/flightClass') do |req|
req.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightClass";
let payload = json!({
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": json!({
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
}),
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"destination": json!({
"airportIataCode": "",
"airportNameOverride": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"gate": "",
"kind": "",
"terminal": ""
}),
"enableSmartTap": false,
"flightHeader": json!({
"carrier": json!({
"airlineAllianceLogo": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"airlineLogo": json!({}),
"airlineName": json!({}),
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
}),
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": json!({}),
"operatingFlightNumber": ""
}),
"flightStatus": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/flightClass \
--header 'content-type: application/json' \
--data '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http POST {{baseUrl}}/walletobjects/v1/flightClass \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightClass
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": [
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
],
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"destination": [
"airportIataCode": "",
"airportNameOverride": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"gate": "",
"kind": "",
"terminal": ""
],
"enableSmartTap": false,
"flightHeader": [
"carrier": [
"airlineAllianceLogo": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"airlineLogo": [],
"airlineName": [],
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
],
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": [],
"operatingFlightNumber": ""
],
"flightStatus": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.flightclass.list
{{baseUrl}}/walletobjects/v1/flightClass
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightClass");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/flightClass")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightClass"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightClass"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightClass");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightClass"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/flightClass HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/flightClass")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightClass"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/flightClass")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/flightClass');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/flightClass'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightClass',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightClass',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/flightClass'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/flightClass');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/flightClass'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightClass" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightClass",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/flightClass');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightClass');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/flightClass');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightClass' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightClass' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/flightClass")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightClass"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightClass"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/flightClass') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightClass";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/flightClass
http GET {{baseUrl}}/walletobjects/v1/flightClass
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightClass
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.flightclass.patch
{{baseUrl}}/walletobjects/v1/flightClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId" {:content-type :json
:form-params {:allowMultipleUsersPerObject false
:boardingAndSeatingPolicy {:boardingPolicy ""
:kind ""
:seatClassPolicy ""}
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:destination {:airportIataCode ""
:airportNameOverride {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:gate ""
:kind ""
:terminal ""}
:enableSmartTap false
:flightHeader {:carrier {:airlineAllianceLogo {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:airlineLogo {}
:airlineName {}
:carrierIataCode ""
:carrierIcaoCode ""
:kind ""}
:flightNumber ""
:flightNumberDisplayOverride ""
:kind ""
:operatingCarrier {}
:operatingFlightNumber ""}
:flightStatus ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localBoardingDateTime ""
:localEstimatedOrActualArrivalDateTime ""
:localEstimatedOrActualDepartureDateTime ""
:localGateClosingDateTime ""
:localScheduledArrivalDateTime ""
:localScheduledDepartureDateTime ""
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:origin {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"),
Content = new StringContent("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
payload := strings.NewReader("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/flightClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3976
{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowMultipleUsersPerObject": @NO,
@"boardingAndSeatingPolicy": @{ @"boardingPolicy": @"", @"kind": @"", @"seatClassPolicy": @"" },
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"destination": @{ @"airportIataCode": @"", @"airportNameOverride": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"gate": @"", @"kind": @"", @"terminal": @"" },
@"enableSmartTap": @NO,
@"flightHeader": @{ @"carrier": @{ @"airlineAllianceLogo": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"airlineLogo": @{ }, @"airlineName": @{ }, @"carrierIataCode": @"", @"carrierIcaoCode": @"", @"kind": @"" }, @"flightNumber": @"", @"flightNumberDisplayOverride": @"", @"kind": @"", @"operatingCarrier": @{ }, @"operatingFlightNumber": @"" },
@"flightStatus": @"",
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"languageOverride": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localBoardingDateTime": @"",
@"localEstimatedOrActualArrivalDateTime": @"",
@"localEstimatedOrActualDepartureDateTime": @"",
@"localGateClosingDateTime": @"",
@"localScheduledArrivalDateTime": @"",
@"localScheduledDepartureDateTime": @"",
@"localizedIssuerName": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"origin": @{ },
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId', [
'body' => '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/flightClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
payload = {
"allowMultipleUsersPerObject": False,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": False,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
payload <- "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/flightClass/:resourceId') do |req|
req.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId";
let payload = json!({
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": json!({
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
}),
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"destination": json!({
"airportIataCode": "",
"airportNameOverride": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"gate": "",
"kind": "",
"terminal": ""
}),
"enableSmartTap": false,
"flightHeader": json!({
"carrier": json!({
"airlineAllianceLogo": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"airlineLogo": json!({}),
"airlineName": json!({}),
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
}),
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": json!({}),
"operatingFlightNumber": ""
}),
"flightStatus": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/flightClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/flightClass/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": [
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
],
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"destination": [
"airportIataCode": "",
"airportNameOverride": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"gate": "",
"kind": "",
"terminal": ""
],
"enableSmartTap": false,
"flightHeader": [
"carrier": [
"airlineAllianceLogo": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"airlineLogo": [],
"airlineName": [],
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
],
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": [],
"operatingFlightNumber": ""
],
"flightStatus": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.flightclass.update
{{baseUrl}}/walletobjects/v1/flightClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId" {:content-type :json
:form-params {:allowMultipleUsersPerObject false
:boardingAndSeatingPolicy {:boardingPolicy ""
:kind ""
:seatClassPolicy ""}
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:destination {:airportIataCode ""
:airportNameOverride {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:gate ""
:kind ""
:terminal ""}
:enableSmartTap false
:flightHeader {:carrier {:airlineAllianceLogo {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:airlineLogo {}
:airlineName {}
:carrierIataCode ""
:carrierIcaoCode ""
:kind ""}
:flightNumber ""
:flightNumberDisplayOverride ""
:kind ""
:operatingCarrier {}
:operatingFlightNumber ""}
:flightStatus ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localBoardingDateTime ""
:localEstimatedOrActualArrivalDateTime ""
:localEstimatedOrActualDepartureDateTime ""
:localGateClosingDateTime ""
:localScheduledArrivalDateTime ""
:localScheduledDepartureDateTime ""
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:origin {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"),
Content = new StringContent("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
payload := strings.NewReader("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/flightClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3976
{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowMultipleUsersPerObject": @NO,
@"boardingAndSeatingPolicy": @{ @"boardingPolicy": @"", @"kind": @"", @"seatClassPolicy": @"" },
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"destination": @{ @"airportIataCode": @"", @"airportNameOverride": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"gate": @"", @"kind": @"", @"terminal": @"" },
@"enableSmartTap": @NO,
@"flightHeader": @{ @"carrier": @{ @"airlineAllianceLogo": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"airlineLogo": @{ }, @"airlineName": @{ }, @"carrierIataCode": @"", @"carrierIcaoCode": @"", @"kind": @"" }, @"flightNumber": @"", @"flightNumberDisplayOverride": @"", @"kind": @"", @"operatingCarrier": @{ }, @"operatingFlightNumber": @"" },
@"flightStatus": @"",
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"languageOverride": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localBoardingDateTime": @"",
@"localEstimatedOrActualArrivalDateTime": @"",
@"localEstimatedOrActualDepartureDateTime": @"",
@"localGateClosingDateTime": @"",
@"localScheduledArrivalDateTime": @"",
@"localScheduledDepartureDateTime": @"",
@"localizedIssuerName": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"origin": @{ },
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightClass/:resourceId",
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([
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId', [
'body' => '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/flightClass/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/flightClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
payload = {
"allowMultipleUsersPerObject": False,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": False,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId"
payload <- "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/flightClass/:resourceId') do |req|
req.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId";
let payload = json!({
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": json!({
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
}),
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"destination": json!({
"airportIataCode": "",
"airportNameOverride": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"gate": "",
"kind": "",
"terminal": ""
}),
"enableSmartTap": false,
"flightHeader": json!({
"carrier": json!({
"airlineAllianceLogo": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"airlineLogo": json!({}),
"airlineName": json!({}),
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
}),
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": json!({}),
"operatingFlightNumber": ""
}),
"flightStatus": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/flightClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PUT {{baseUrl}}/walletobjects/v1/flightClass/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": [
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
],
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"destination": [
"airportIataCode": "",
"airportNameOverride": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"gate": "",
"kind": "",
"terminal": ""
],
"enableSmartTap": false,
"flightHeader": [
"carrier": [
"airlineAllianceLogo": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"airlineLogo": [],
"airlineName": [],
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
],
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": [],
"operatingFlightNumber": ""
],
"flightStatus": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.flightobject.addmessage
{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/flightObject/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightObject/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/flightObject/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/flightObject/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.flightobject.get
{{baseUrl}}/walletobjects/v1/flightObject/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/flightObject/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightObject/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/flightObject/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/flightObject/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/flightObject/:resourceId
http GET {{baseUrl}}/walletobjects/v1/flightObject/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightObject/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.flightobject.insert
{{baseUrl}}/walletobjects/v1/flightObject
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightObject");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/flightObject" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:boardingAndSeatingInfo {:boardingDoor ""
:boardingGroup ""
:boardingPosition ""
:boardingPrivilegeImage {}
:kind ""
:seatAssignment {}
:seatClass ""
:seatNumber ""
:sequenceNumber ""}
:classId ""
:classReference {:allowMultipleUsersPerObject false
:boardingAndSeatingPolicy {:boardingPolicy ""
:kind ""
:seatClassPolicy ""}
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:destination {:airportIataCode ""
:airportNameOverride {}
:gate ""
:kind ""
:terminal ""}
:enableSmartTap false
:flightHeader {:carrier {:airlineAllianceLogo {}
:airlineLogo {}
:airlineName {}
:carrierIataCode ""
:carrierIcaoCode ""
:kind ""}
:flightNumber ""
:flightNumberDisplayOverride ""
:kind ""
:operatingCarrier {}
:operatingFlightNumber ""}
:flightStatus ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localBoardingDateTime ""
:localEstimatedOrActualArrivalDateTime ""
:localEstimatedOrActualDepartureDateTime ""
:localGateClosingDateTime ""
:localScheduledArrivalDateTime ""
:localScheduledDepartureDateTime ""
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:origin {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:passengerName ""
:reservationInfo {:confirmationCode ""
:eticketNumber ""
:frequentFlyerInfo {:frequentFlyerNumber ""
:frequentFlyerProgramName {}
:kind ""}
:kind ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:securityProgramLogo {}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightObject"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightObject"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightObject");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightObject"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/flightObject HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6223
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/flightObject")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightObject"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/flightObject")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {
frequentFlyerNumber: '',
frequentFlyerProgramName: {},
kind: ''
},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/flightObject');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"boardingAndSeatingInfo":{"boardingDoor":"","boardingGroup":"","boardingPosition":"","boardingPrivilegeImage":{},"kind":"","seatAssignment":{},"seatClass":"","seatNumber":"","sequenceNumber":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerName":"","reservationInfo":{"confirmationCode":"","eticketNumber":"","frequentFlyerInfo":{"frequentFlyerNumber":"","frequentFlyerProgramName":{},"kind":""},"kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"securityProgramLogo":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightObject',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "boardingAndSeatingInfo": {\n "boardingDoor": "",\n "boardingGroup": "",\n "boardingPosition": "",\n "boardingPrivilegeImage": {},\n "kind": "",\n "seatAssignment": {},\n "seatClass": "",\n "seatNumber": "",\n "sequenceNumber": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {},\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {},\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerName": "",\n "reservationInfo": {\n "confirmationCode": "",\n "eticketNumber": "",\n "frequentFlyerInfo": {\n "frequentFlyerNumber": "",\n "frequentFlyerProgramName": {},\n "kind": ""\n },\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "securityProgramLogo": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightObject',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightObject',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/flightObject');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {
frequentFlyerNumber: '',
frequentFlyerProgramName: {},
kind: ''
},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/flightObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"boardingAndSeatingInfo":{"boardingDoor":"","boardingGroup":"","boardingPosition":"","boardingPrivilegeImage":{},"kind":"","seatAssignment":{},"seatClass":"","seatNumber":"","sequenceNumber":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerName":"","reservationInfo":{"confirmationCode":"","eticketNumber":"","frequentFlyerInfo":{"frequentFlyerNumber":"","frequentFlyerProgramName":{},"kind":""},"kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"securityProgramLogo":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"boardingAndSeatingInfo": @{ @"boardingDoor": @"", @"boardingGroup": @"", @"boardingPosition": @"", @"boardingPrivilegeImage": @{ }, @"kind": @"", @"seatAssignment": @{ }, @"seatClass": @"", @"seatNumber": @"", @"sequenceNumber": @"" },
@"classId": @"",
@"classReference": @{ @"allowMultipleUsersPerObject": @NO, @"boardingAndSeatingPolicy": @{ @"boardingPolicy": @"", @"kind": @"", @"seatClassPolicy": @"" }, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"destination": @{ @"airportIataCode": @"", @"airportNameOverride": @{ }, @"gate": @"", @"kind": @"", @"terminal": @"" }, @"enableSmartTap": @NO, @"flightHeader": @{ @"carrier": @{ @"airlineAllianceLogo": @{ }, @"airlineLogo": @{ }, @"airlineName": @{ }, @"carrierIataCode": @"", @"carrierIcaoCode": @"", @"kind": @"" }, @"flightNumber": @"", @"flightNumberDisplayOverride": @"", @"kind": @"", @"operatingCarrier": @{ }, @"operatingFlightNumber": @"" }, @"flightStatus": @"", @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"languageOverride": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localBoardingDateTime": @"", @"localEstimatedOrActualArrivalDateTime": @"", @"localEstimatedOrActualDepartureDateTime": @"", @"localGateClosingDateTime": @"", @"localScheduledArrivalDateTime": @"", @"localScheduledDepartureDateTime": @"", @"localizedIssuerName": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"origin": @{ }, @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"passengerName": @"",
@"reservationInfo": @{ @"confirmationCode": @"", @"eticketNumber": @"", @"frequentFlyerInfo": @{ @"frequentFlyerNumber": @"", @"frequentFlyerProgramName": @{ }, @"kind": @"" }, @"kind": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"securityProgramLogo": @{ },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightObject" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightObject",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'boardingAndSeatingInfo' => [
'boardingDoor' => '',
'boardingGroup' => '',
'boardingPosition' => '',
'boardingPrivilegeImage' => [
],
'kind' => '',
'seatAssignment' => [
],
'seatClass' => '',
'seatNumber' => '',
'sequenceNumber' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerName' => '',
'reservationInfo' => [
'confirmationCode' => '',
'eticketNumber' => '',
'frequentFlyerInfo' => [
'frequentFlyerNumber' => '',
'frequentFlyerProgramName' => [
],
'kind' => ''
],
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'securityProgramLogo' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/flightObject', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightObject');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'boardingAndSeatingInfo' => [
'boardingDoor' => '',
'boardingGroup' => '',
'boardingPosition' => '',
'boardingPrivilegeImage' => [
],
'kind' => '',
'seatAssignment' => [
],
'seatClass' => '',
'seatNumber' => '',
'sequenceNumber' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerName' => '',
'reservationInfo' => [
'confirmationCode' => '',
'eticketNumber' => '',
'frequentFlyerInfo' => [
'frequentFlyerNumber' => '',
'frequentFlyerProgramName' => [
],
'kind' => ''
],
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'securityProgramLogo' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'boardingAndSeatingInfo' => [
'boardingDoor' => '',
'boardingGroup' => '',
'boardingPosition' => '',
'boardingPrivilegeImage' => [
],
'kind' => '',
'seatAssignment' => [
],
'seatClass' => '',
'seatNumber' => '',
'sequenceNumber' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerName' => '',
'reservationInfo' => [
'confirmationCode' => '',
'eticketNumber' => '',
'frequentFlyerInfo' => [
'frequentFlyerNumber' => '',
'frequentFlyerProgramName' => [
],
'kind' => ''
],
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'securityProgramLogo' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/flightObject');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/flightObject", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightObject"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": False,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": False,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightObject"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/flightObject') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightObject";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"boardingAndSeatingInfo": json!({
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": json!({}),
"kind": "",
"seatAssignment": json!({}),
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
}),
"classId": "",
"classReference": json!({
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": json!({
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
}),
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"destination": json!({
"airportIataCode": "",
"airportNameOverride": json!({}),
"gate": "",
"kind": "",
"terminal": ""
}),
"enableSmartTap": false,
"flightHeader": json!({
"carrier": json!({
"airlineAllianceLogo": json!({}),
"airlineLogo": json!({}),
"airlineName": json!({}),
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
}),
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": json!({}),
"operatingFlightNumber": ""
}),
"flightStatus": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"passengerName": "",
"reservationInfo": json!({
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": json!({
"frequentFlyerNumber": "",
"frequentFlyerProgramName": json!({}),
"kind": ""
}),
"kind": ""
}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"securityProgramLogo": json!({}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/flightObject \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http POST {{baseUrl}}/walletobjects/v1/flightObject \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "boardingAndSeatingInfo": {\n "boardingDoor": "",\n "boardingGroup": "",\n "boardingPosition": "",\n "boardingPrivilegeImage": {},\n "kind": "",\n "seatAssignment": {},\n "seatClass": "",\n "seatNumber": "",\n "sequenceNumber": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {},\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {},\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerName": "",\n "reservationInfo": {\n "confirmationCode": "",\n "eticketNumber": "",\n "frequentFlyerInfo": {\n "frequentFlyerNumber": "",\n "frequentFlyerProgramName": {},\n "kind": ""\n },\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "securityProgramLogo": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightObject
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"boardingAndSeatingInfo": [
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": [],
"kind": "",
"seatAssignment": [],
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
],
"classId": "",
"classReference": [
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": [
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
],
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"destination": [
"airportIataCode": "",
"airportNameOverride": [],
"gate": "",
"kind": "",
"terminal": ""
],
"enableSmartTap": false,
"flightHeader": [
"carrier": [
"airlineAllianceLogo": [],
"airlineLogo": [],
"airlineName": [],
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
],
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": [],
"operatingFlightNumber": ""
],
"flightStatus": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"passengerName": "",
"reservationInfo": [
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": [
"frequentFlyerNumber": "",
"frequentFlyerProgramName": [],
"kind": ""
],
"kind": ""
],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"securityProgramLogo": [],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.flightobject.list
{{baseUrl}}/walletobjects/v1/flightObject
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightObject");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/flightObject")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightObject"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightObject"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightObject");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightObject"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/flightObject HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/flightObject")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightObject"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/flightObject")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/flightObject');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/flightObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightObject',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightObject',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/flightObject'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/flightObject');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/flightObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightObject" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightObject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/flightObject');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightObject');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/flightObject');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightObject' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightObject' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/flightObject")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightObject"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightObject"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/flightObject') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightObject";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/flightObject
http GET {{baseUrl}}/walletobjects/v1/flightObject
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightObject
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.flightobject.patch
{{baseUrl}}/walletobjects/v1/flightObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:boardingAndSeatingInfo {:boardingDoor ""
:boardingGroup ""
:boardingPosition ""
:boardingPrivilegeImage {}
:kind ""
:seatAssignment {}
:seatClass ""
:seatNumber ""
:sequenceNumber ""}
:classId ""
:classReference {:allowMultipleUsersPerObject false
:boardingAndSeatingPolicy {:boardingPolicy ""
:kind ""
:seatClassPolicy ""}
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:destination {:airportIataCode ""
:airportNameOverride {}
:gate ""
:kind ""
:terminal ""}
:enableSmartTap false
:flightHeader {:carrier {:airlineAllianceLogo {}
:airlineLogo {}
:airlineName {}
:carrierIataCode ""
:carrierIcaoCode ""
:kind ""}
:flightNumber ""
:flightNumberDisplayOverride ""
:kind ""
:operatingCarrier {}
:operatingFlightNumber ""}
:flightStatus ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localBoardingDateTime ""
:localEstimatedOrActualArrivalDateTime ""
:localEstimatedOrActualDepartureDateTime ""
:localGateClosingDateTime ""
:localScheduledArrivalDateTime ""
:localScheduledDepartureDateTime ""
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:origin {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:passengerName ""
:reservationInfo {:confirmationCode ""
:eticketNumber ""
:frequentFlyerInfo {:frequentFlyerNumber ""
:frequentFlyerProgramName {}
:kind ""}
:kind ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:securityProgramLogo {}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/flightObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6223
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {
frequentFlyerNumber: '',
frequentFlyerProgramName: {},
kind: ''
},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"boardingAndSeatingInfo":{"boardingDoor":"","boardingGroup":"","boardingPosition":"","boardingPrivilegeImage":{},"kind":"","seatAssignment":{},"seatClass":"","seatNumber":"","sequenceNumber":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerName":"","reservationInfo":{"confirmationCode":"","eticketNumber":"","frequentFlyerInfo":{"frequentFlyerNumber":"","frequentFlyerProgramName":{},"kind":""},"kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"securityProgramLogo":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "boardingAndSeatingInfo": {\n "boardingDoor": "",\n "boardingGroup": "",\n "boardingPosition": "",\n "boardingPrivilegeImage": {},\n "kind": "",\n "seatAssignment": {},\n "seatClass": "",\n "seatNumber": "",\n "sequenceNumber": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {},\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {},\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerName": "",\n "reservationInfo": {\n "confirmationCode": "",\n "eticketNumber": "",\n "frequentFlyerInfo": {\n "frequentFlyerNumber": "",\n "frequentFlyerProgramName": {},\n "kind": ""\n },\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "securityProgramLogo": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {
frequentFlyerNumber: '',
frequentFlyerProgramName: {},
kind: ''
},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"boardingAndSeatingInfo":{"boardingDoor":"","boardingGroup":"","boardingPosition":"","boardingPrivilegeImage":{},"kind":"","seatAssignment":{},"seatClass":"","seatNumber":"","sequenceNumber":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerName":"","reservationInfo":{"confirmationCode":"","eticketNumber":"","frequentFlyerInfo":{"frequentFlyerNumber":"","frequentFlyerProgramName":{},"kind":""},"kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"securityProgramLogo":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"boardingAndSeatingInfo": @{ @"boardingDoor": @"", @"boardingGroup": @"", @"boardingPosition": @"", @"boardingPrivilegeImage": @{ }, @"kind": @"", @"seatAssignment": @{ }, @"seatClass": @"", @"seatNumber": @"", @"sequenceNumber": @"" },
@"classId": @"",
@"classReference": @{ @"allowMultipleUsersPerObject": @NO, @"boardingAndSeatingPolicy": @{ @"boardingPolicy": @"", @"kind": @"", @"seatClassPolicy": @"" }, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"destination": @{ @"airportIataCode": @"", @"airportNameOverride": @{ }, @"gate": @"", @"kind": @"", @"terminal": @"" }, @"enableSmartTap": @NO, @"flightHeader": @{ @"carrier": @{ @"airlineAllianceLogo": @{ }, @"airlineLogo": @{ }, @"airlineName": @{ }, @"carrierIataCode": @"", @"carrierIcaoCode": @"", @"kind": @"" }, @"flightNumber": @"", @"flightNumberDisplayOverride": @"", @"kind": @"", @"operatingCarrier": @{ }, @"operatingFlightNumber": @"" }, @"flightStatus": @"", @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"languageOverride": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localBoardingDateTime": @"", @"localEstimatedOrActualArrivalDateTime": @"", @"localEstimatedOrActualDepartureDateTime": @"", @"localGateClosingDateTime": @"", @"localScheduledArrivalDateTime": @"", @"localScheduledDepartureDateTime": @"", @"localizedIssuerName": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"origin": @{ }, @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"passengerName": @"",
@"reservationInfo": @{ @"confirmationCode": @"", @"eticketNumber": @"", @"frequentFlyerInfo": @{ @"frequentFlyerNumber": @"", @"frequentFlyerProgramName": @{ }, @"kind": @"" }, @"kind": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"securityProgramLogo": @{ },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'boardingAndSeatingInfo' => [
'boardingDoor' => '',
'boardingGroup' => '',
'boardingPosition' => '',
'boardingPrivilegeImage' => [
],
'kind' => '',
'seatAssignment' => [
],
'seatClass' => '',
'seatNumber' => '',
'sequenceNumber' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerName' => '',
'reservationInfo' => [
'confirmationCode' => '',
'eticketNumber' => '',
'frequentFlyerInfo' => [
'frequentFlyerNumber' => '',
'frequentFlyerProgramName' => [
],
'kind' => ''
],
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'securityProgramLogo' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'boardingAndSeatingInfo' => [
'boardingDoor' => '',
'boardingGroup' => '',
'boardingPosition' => '',
'boardingPrivilegeImage' => [
],
'kind' => '',
'seatAssignment' => [
],
'seatClass' => '',
'seatNumber' => '',
'sequenceNumber' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerName' => '',
'reservationInfo' => [
'confirmationCode' => '',
'eticketNumber' => '',
'frequentFlyerInfo' => [
'frequentFlyerNumber' => '',
'frequentFlyerProgramName' => [
],
'kind' => ''
],
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'securityProgramLogo' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'boardingAndSeatingInfo' => [
'boardingDoor' => '',
'boardingGroup' => '',
'boardingPosition' => '',
'boardingPrivilegeImage' => [
],
'kind' => '',
'seatAssignment' => [
],
'seatClass' => '',
'seatNumber' => '',
'sequenceNumber' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerName' => '',
'reservationInfo' => [
'confirmationCode' => '',
'eticketNumber' => '',
'frequentFlyerInfo' => [
'frequentFlyerNumber' => '',
'frequentFlyerProgramName' => [
],
'kind' => ''
],
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'securityProgramLogo' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/flightObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": False,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": False,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/flightObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"boardingAndSeatingInfo": json!({
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": json!({}),
"kind": "",
"seatAssignment": json!({}),
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
}),
"classId": "",
"classReference": json!({
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": json!({
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
}),
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"destination": json!({
"airportIataCode": "",
"airportNameOverride": json!({}),
"gate": "",
"kind": "",
"terminal": ""
}),
"enableSmartTap": false,
"flightHeader": json!({
"carrier": json!({
"airlineAllianceLogo": json!({}),
"airlineLogo": json!({}),
"airlineName": json!({}),
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
}),
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": json!({}),
"operatingFlightNumber": ""
}),
"flightStatus": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"passengerName": "",
"reservationInfo": json!({
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": json!({
"frequentFlyerNumber": "",
"frequentFlyerProgramName": json!({}),
"kind": ""
}),
"kind": ""
}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"securityProgramLogo": json!({}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/flightObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/flightObject/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "boardingAndSeatingInfo": {\n "boardingDoor": "",\n "boardingGroup": "",\n "boardingPosition": "",\n "boardingPrivilegeImage": {},\n "kind": "",\n "seatAssignment": {},\n "seatClass": "",\n "seatNumber": "",\n "sequenceNumber": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {},\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {},\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerName": "",\n "reservationInfo": {\n "confirmationCode": "",\n "eticketNumber": "",\n "frequentFlyerInfo": {\n "frequentFlyerNumber": "",\n "frequentFlyerProgramName": {},\n "kind": ""\n },\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "securityProgramLogo": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"boardingAndSeatingInfo": [
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": [],
"kind": "",
"seatAssignment": [],
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
],
"classId": "",
"classReference": [
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": [
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
],
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"destination": [
"airportIataCode": "",
"airportNameOverride": [],
"gate": "",
"kind": "",
"terminal": ""
],
"enableSmartTap": false,
"flightHeader": [
"carrier": [
"airlineAllianceLogo": [],
"airlineLogo": [],
"airlineName": [],
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
],
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": [],
"operatingFlightNumber": ""
],
"flightStatus": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"passengerName": "",
"reservationInfo": [
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": [
"frequentFlyerNumber": "",
"frequentFlyerProgramName": [],
"kind": ""
],
"kind": ""
],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"securityProgramLogo": [],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.flightobject.update
{{baseUrl}}/walletobjects/v1/flightObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:boardingAndSeatingInfo {:boardingDoor ""
:boardingGroup ""
:boardingPosition ""
:boardingPrivilegeImage {}
:kind ""
:seatAssignment {}
:seatClass ""
:seatNumber ""
:sequenceNumber ""}
:classId ""
:classReference {:allowMultipleUsersPerObject false
:boardingAndSeatingPolicy {:boardingPolicy ""
:kind ""
:seatClassPolicy ""}
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:destination {:airportIataCode ""
:airportNameOverride {}
:gate ""
:kind ""
:terminal ""}
:enableSmartTap false
:flightHeader {:carrier {:airlineAllianceLogo {}
:airlineLogo {}
:airlineName {}
:carrierIataCode ""
:carrierIcaoCode ""
:kind ""}
:flightNumber ""
:flightNumberDisplayOverride ""
:kind ""
:operatingCarrier {}
:operatingFlightNumber ""}
:flightStatus ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localBoardingDateTime ""
:localEstimatedOrActualArrivalDateTime ""
:localEstimatedOrActualDepartureDateTime ""
:localGateClosingDateTime ""
:localScheduledArrivalDateTime ""
:localScheduledDepartureDateTime ""
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:origin {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:passengerName ""
:reservationInfo {:confirmationCode ""
:eticketNumber ""
:frequentFlyerInfo {:frequentFlyerNumber ""
:frequentFlyerProgramName {}
:kind ""}
:kind ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:securityProgramLogo {}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/flightObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6223
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {
frequentFlyerNumber: '',
frequentFlyerProgramName: {},
kind: ''
},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"boardingAndSeatingInfo":{"boardingDoor":"","boardingGroup":"","boardingPosition":"","boardingPrivilegeImage":{},"kind":"","seatAssignment":{},"seatClass":"","seatNumber":"","sequenceNumber":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerName":"","reservationInfo":{"confirmationCode":"","eticketNumber":"","frequentFlyerInfo":{"frequentFlyerNumber":"","frequentFlyerProgramName":{},"kind":""},"kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"securityProgramLogo":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "boardingAndSeatingInfo": {\n "boardingDoor": "",\n "boardingGroup": "",\n "boardingPosition": "",\n "boardingPrivilegeImage": {},\n "kind": "",\n "seatAssignment": {},\n "seatClass": "",\n "seatNumber": "",\n "sequenceNumber": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {},\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {},\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerName": "",\n "reservationInfo": {\n "confirmationCode": "",\n "eticketNumber": "",\n "frequentFlyerInfo": {\n "frequentFlyerNumber": "",\n "frequentFlyerProgramName": {},\n "kind": ""\n },\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "securityProgramLogo": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/flightObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {
boardingPolicy: '',
kind: '',
seatClassPolicy: ''
},
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {
airportIataCode: '',
airportNameOverride: {},
gate: '',
kind: '',
terminal: ''
},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {
frequentFlyerNumber: '',
frequentFlyerProgramName: {},
kind: ''
},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
boardingAndSeatingInfo: {
boardingDoor: '',
boardingGroup: '',
boardingPosition: '',
boardingPrivilegeImage: {},
kind: '',
seatAssignment: {},
seatClass: '',
seatNumber: '',
sequenceNumber: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
boardingAndSeatingPolicy: {boardingPolicy: '', kind: '', seatClassPolicy: ''},
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
destination: {airportIataCode: '', airportNameOverride: {}, gate: '', kind: '', terminal: ''},
enableSmartTap: false,
flightHeader: {
carrier: {
airlineAllianceLogo: {},
airlineLogo: {},
airlineName: {},
carrierIataCode: '',
carrierIcaoCode: '',
kind: ''
},
flightNumber: '',
flightNumberDisplayOverride: '',
kind: '',
operatingCarrier: {},
operatingFlightNumber: ''
},
flightStatus: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localBoardingDateTime: '',
localEstimatedOrActualArrivalDateTime: '',
localEstimatedOrActualDepartureDateTime: '',
localGateClosingDateTime: '',
localScheduledArrivalDateTime: '',
localScheduledDepartureDateTime: '',
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
origin: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerName: '',
reservationInfo: {
confirmationCode: '',
eticketNumber: '',
frequentFlyerInfo: {frequentFlyerNumber: '', frequentFlyerProgramName: {}, kind: ''},
kind: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
securityProgramLogo: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"boardingAndSeatingInfo":{"boardingDoor":"","boardingGroup":"","boardingPosition":"","boardingPrivilegeImage":{},"kind":"","seatAssignment":{},"seatClass":"","seatNumber":"","sequenceNumber":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"boardingAndSeatingPolicy":{"boardingPolicy":"","kind":"","seatClassPolicy":""},"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","destination":{"airportIataCode":"","airportNameOverride":{},"gate":"","kind":"","terminal":""},"enableSmartTap":false,"flightHeader":{"carrier":{"airlineAllianceLogo":{},"airlineLogo":{},"airlineName":{},"carrierIataCode":"","carrierIcaoCode":"","kind":""},"flightNumber":"","flightNumberDisplayOverride":"","kind":"","operatingCarrier":{},"operatingFlightNumber":""},"flightStatus":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localBoardingDateTime":"","localEstimatedOrActualArrivalDateTime":"","localEstimatedOrActualDepartureDateTime":"","localGateClosingDateTime":"","localScheduledArrivalDateTime":"","localScheduledDepartureDateTime":"","localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","origin":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerName":"","reservationInfo":{"confirmationCode":"","eticketNumber":"","frequentFlyerInfo":{"frequentFlyerNumber":"","frequentFlyerProgramName":{},"kind":""},"kind":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"securityProgramLogo":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"boardingAndSeatingInfo": @{ @"boardingDoor": @"", @"boardingGroup": @"", @"boardingPosition": @"", @"boardingPrivilegeImage": @{ }, @"kind": @"", @"seatAssignment": @{ }, @"seatClass": @"", @"seatNumber": @"", @"sequenceNumber": @"" },
@"classId": @"",
@"classReference": @{ @"allowMultipleUsersPerObject": @NO, @"boardingAndSeatingPolicy": @{ @"boardingPolicy": @"", @"kind": @"", @"seatClassPolicy": @"" }, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"destination": @{ @"airportIataCode": @"", @"airportNameOverride": @{ }, @"gate": @"", @"kind": @"", @"terminal": @"" }, @"enableSmartTap": @NO, @"flightHeader": @{ @"carrier": @{ @"airlineAllianceLogo": @{ }, @"airlineLogo": @{ }, @"airlineName": @{ }, @"carrierIataCode": @"", @"carrierIcaoCode": @"", @"kind": @"" }, @"flightNumber": @"", @"flightNumberDisplayOverride": @"", @"kind": @"", @"operatingCarrier": @{ }, @"operatingFlightNumber": @"" }, @"flightStatus": @"", @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"languageOverride": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localBoardingDateTime": @"", @"localEstimatedOrActualArrivalDateTime": @"", @"localEstimatedOrActualDepartureDateTime": @"", @"localGateClosingDateTime": @"", @"localScheduledArrivalDateTime": @"", @"localScheduledDepartureDateTime": @"", @"localizedIssuerName": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"origin": @{ }, @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"passengerName": @"",
@"reservationInfo": @{ @"confirmationCode": @"", @"eticketNumber": @"", @"frequentFlyerInfo": @{ @"frequentFlyerNumber": @"", @"frequentFlyerProgramName": @{ }, @"kind": @"" }, @"kind": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"securityProgramLogo": @{ },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/flightObject/:resourceId",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'boardingAndSeatingInfo' => [
'boardingDoor' => '',
'boardingGroup' => '',
'boardingPosition' => '',
'boardingPrivilegeImage' => [
],
'kind' => '',
'seatAssignment' => [
],
'seatClass' => '',
'seatNumber' => '',
'sequenceNumber' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerName' => '',
'reservationInfo' => [
'confirmationCode' => '',
'eticketNumber' => '',
'frequentFlyerInfo' => [
'frequentFlyerNumber' => '',
'frequentFlyerProgramName' => [
],
'kind' => ''
],
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'securityProgramLogo' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'boardingAndSeatingInfo' => [
'boardingDoor' => '',
'boardingGroup' => '',
'boardingPosition' => '',
'boardingPrivilegeImage' => [
],
'kind' => '',
'seatAssignment' => [
],
'seatClass' => '',
'seatNumber' => '',
'sequenceNumber' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerName' => '',
'reservationInfo' => [
'confirmationCode' => '',
'eticketNumber' => '',
'frequentFlyerInfo' => [
'frequentFlyerNumber' => '',
'frequentFlyerProgramName' => [
],
'kind' => ''
],
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'securityProgramLogo' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'boardingAndSeatingInfo' => [
'boardingDoor' => '',
'boardingGroup' => '',
'boardingPosition' => '',
'boardingPrivilegeImage' => [
],
'kind' => '',
'seatAssignment' => [
],
'seatClass' => '',
'seatNumber' => '',
'sequenceNumber' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'boardingAndSeatingPolicy' => [
'boardingPolicy' => '',
'kind' => '',
'seatClassPolicy' => ''
],
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'destination' => [
'airportIataCode' => '',
'airportNameOverride' => [
],
'gate' => '',
'kind' => '',
'terminal' => ''
],
'enableSmartTap' => null,
'flightHeader' => [
'carrier' => [
'airlineAllianceLogo' => [
],
'airlineLogo' => [
],
'airlineName' => [
],
'carrierIataCode' => '',
'carrierIcaoCode' => '',
'kind' => ''
],
'flightNumber' => '',
'flightNumberDisplayOverride' => '',
'kind' => '',
'operatingCarrier' => [
],
'operatingFlightNumber' => ''
],
'flightStatus' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localBoardingDateTime' => '',
'localEstimatedOrActualArrivalDateTime' => '',
'localEstimatedOrActualDepartureDateTime' => '',
'localGateClosingDateTime' => '',
'localScheduledArrivalDateTime' => '',
'localScheduledDepartureDateTime' => '',
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'origin' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerName' => '',
'reservationInfo' => [
'confirmationCode' => '',
'eticketNumber' => '',
'frequentFlyerInfo' => [
'frequentFlyerNumber' => '',
'frequentFlyerProgramName' => [
],
'kind' => ''
],
'kind' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'securityProgramLogo' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/flightObject/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/flightObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/flightObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": False,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": False,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/flightObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"boardingAndSeatingInfo\": {\n \"boardingDoor\": \"\",\n \"boardingGroup\": \"\",\n \"boardingPosition\": \"\",\n \"boardingPrivilegeImage\": {},\n \"kind\": \"\",\n \"seatAssignment\": {},\n \"seatClass\": \"\",\n \"seatNumber\": \"\",\n \"sequenceNumber\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"boardingAndSeatingPolicy\": {\n \"boardingPolicy\": \"\",\n \"kind\": \"\",\n \"seatClassPolicy\": \"\"\n },\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"destination\": {\n \"airportIataCode\": \"\",\n \"airportNameOverride\": {},\n \"gate\": \"\",\n \"kind\": \"\",\n \"terminal\": \"\"\n },\n \"enableSmartTap\": false,\n \"flightHeader\": {\n \"carrier\": {\n \"airlineAllianceLogo\": {},\n \"airlineLogo\": {},\n \"airlineName\": {},\n \"carrierIataCode\": \"\",\n \"carrierIcaoCode\": \"\",\n \"kind\": \"\"\n },\n \"flightNumber\": \"\",\n \"flightNumberDisplayOverride\": \"\",\n \"kind\": \"\",\n \"operatingCarrier\": {},\n \"operatingFlightNumber\": \"\"\n },\n \"flightStatus\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localBoardingDateTime\": \"\",\n \"localEstimatedOrActualArrivalDateTime\": \"\",\n \"localEstimatedOrActualDepartureDateTime\": \"\",\n \"localGateClosingDateTime\": \"\",\n \"localScheduledArrivalDateTime\": \"\",\n \"localScheduledDepartureDateTime\": \"\",\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"origin\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerName\": \"\",\n \"reservationInfo\": {\n \"confirmationCode\": \"\",\n \"eticketNumber\": \"\",\n \"frequentFlyerInfo\": {\n \"frequentFlyerNumber\": \"\",\n \"frequentFlyerProgramName\": {},\n \"kind\": \"\"\n },\n \"kind\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"securityProgramLogo\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"boardingAndSeatingInfo": json!({
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": json!({}),
"kind": "",
"seatAssignment": json!({}),
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
}),
"classId": "",
"classReference": json!({
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": json!({
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
}),
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"destination": json!({
"airportIataCode": "",
"airportNameOverride": json!({}),
"gate": "",
"kind": "",
"terminal": ""
}),
"enableSmartTap": false,
"flightHeader": json!({
"carrier": json!({
"airlineAllianceLogo": json!({}),
"airlineLogo": json!({}),
"airlineName": json!({}),
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
}),
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": json!({}),
"operatingFlightNumber": ""
}),
"flightStatus": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"passengerName": "",
"reservationInfo": json!({
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": json!({
"frequentFlyerNumber": "",
"frequentFlyerProgramName": json!({}),
"kind": ""
}),
"kind": ""
}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"securityProgramLogo": json!({}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/flightObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"boardingAndSeatingInfo": {
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": {},
"kind": "",
"seatAssignment": {},
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": {
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
},
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"destination": {
"airportIataCode": "",
"airportNameOverride": {},
"gate": "",
"kind": "",
"terminal": ""
},
"enableSmartTap": false,
"flightHeader": {
"carrier": {
"airlineAllianceLogo": {},
"airlineLogo": {},
"airlineName": {},
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
},
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": {},
"operatingFlightNumber": ""
},
"flightStatus": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerName": "",
"reservationInfo": {
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": {
"frequentFlyerNumber": "",
"frequentFlyerProgramName": {},
"kind": ""
},
"kind": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"securityProgramLogo": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http PUT {{baseUrl}}/walletobjects/v1/flightObject/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "boardingAndSeatingInfo": {\n "boardingDoor": "",\n "boardingGroup": "",\n "boardingPosition": "",\n "boardingPrivilegeImage": {},\n "kind": "",\n "seatAssignment": {},\n "seatClass": "",\n "seatNumber": "",\n "sequenceNumber": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "boardingAndSeatingPolicy": {\n "boardingPolicy": "",\n "kind": "",\n "seatClassPolicy": ""\n },\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "destination": {\n "airportIataCode": "",\n "airportNameOverride": {},\n "gate": "",\n "kind": "",\n "terminal": ""\n },\n "enableSmartTap": false,\n "flightHeader": {\n "carrier": {\n "airlineAllianceLogo": {},\n "airlineLogo": {},\n "airlineName": {},\n "carrierIataCode": "",\n "carrierIcaoCode": "",\n "kind": ""\n },\n "flightNumber": "",\n "flightNumberDisplayOverride": "",\n "kind": "",\n "operatingCarrier": {},\n "operatingFlightNumber": ""\n },\n "flightStatus": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localBoardingDateTime": "",\n "localEstimatedOrActualArrivalDateTime": "",\n "localEstimatedOrActualDepartureDateTime": "",\n "localGateClosingDateTime": "",\n "localScheduledArrivalDateTime": "",\n "localScheduledDepartureDateTime": "",\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "origin": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerName": "",\n "reservationInfo": {\n "confirmationCode": "",\n "eticketNumber": "",\n "frequentFlyerInfo": {\n "frequentFlyerNumber": "",\n "frequentFlyerProgramName": {},\n "kind": ""\n },\n "kind": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "securityProgramLogo": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/flightObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"boardingAndSeatingInfo": [
"boardingDoor": "",
"boardingGroup": "",
"boardingPosition": "",
"boardingPrivilegeImage": [],
"kind": "",
"seatAssignment": [],
"seatClass": "",
"seatNumber": "",
"sequenceNumber": ""
],
"classId": "",
"classReference": [
"allowMultipleUsersPerObject": false,
"boardingAndSeatingPolicy": [
"boardingPolicy": "",
"kind": "",
"seatClassPolicy": ""
],
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"destination": [
"airportIataCode": "",
"airportNameOverride": [],
"gate": "",
"kind": "",
"terminal": ""
],
"enableSmartTap": false,
"flightHeader": [
"carrier": [
"airlineAllianceLogo": [],
"airlineLogo": [],
"airlineName": [],
"carrierIataCode": "",
"carrierIcaoCode": "",
"kind": ""
],
"flightNumber": "",
"flightNumberDisplayOverride": "",
"kind": "",
"operatingCarrier": [],
"operatingFlightNumber": ""
],
"flightStatus": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localBoardingDateTime": "",
"localEstimatedOrActualArrivalDateTime": "",
"localEstimatedOrActualDepartureDateTime": "",
"localGateClosingDateTime": "",
"localScheduledArrivalDateTime": "",
"localScheduledDepartureDateTime": "",
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"origin": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"passengerName": "",
"reservationInfo": [
"confirmationCode": "",
"eticketNumber": "",
"frequentFlyerInfo": [
"frequentFlyerNumber": "",
"frequentFlyerProgramName": [],
"kind": ""
],
"kind": ""
],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"securityProgramLogo": [],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/flightObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.genericclass.get
{{baseUrl}}/walletobjects/v1/genericClass/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/genericClass/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericClass/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/genericClass/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/genericClass/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/genericClass/:resourceId
http GET {{baseUrl}}/walletobjects/v1/genericClass/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericClass/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.genericclass.insert
{{baseUrl}}/walletobjects/v1/genericClass
BODY json
{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericClass");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/genericClass" {:content-type :json
:form-params {:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:enableSmartTap false
:id ""
:imageModulesData [{:id ""
:mainImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}}]
:linksModuleData {:uris [{:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}]}
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:viewUnlockRequirement ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericClass"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericClass"),
Content = new StringContent("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericClass");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericClass"
payload := strings.NewReader("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/genericClass HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2180
{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/genericClass")
.setHeader("content-type", "application/json")
.setBody("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericClass"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/genericClass")
.header("content-type", "application/json")
.body("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
.asString();
const data = JSON.stringify({
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
}
}
],
linksModuleData: {
uris: [
{
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
]
},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
viewUnlockRequirement: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/genericClass');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/genericClass',
headers: {'content-type': 'application/json'},
data: {
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"enableSmartTap":false,"id":"","imageModulesData":[{"id":"","mainImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}}}],"linksModuleData":{"uris":[{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}]},"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"viewUnlockRequirement":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericClass',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "enableSmartTap": false,\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n }\n }\n ],\n "linksModuleData": {\n "uris": [\n {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n ]\n },\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "viewUnlockRequirement": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericClass',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/genericClass',
headers: {'content-type': 'application/json'},
body: {
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/genericClass');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
}
}
],
linksModuleData: {
uris: [
{
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
]
},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
viewUnlockRequirement: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/genericClass',
headers: {'content-type': 'application/json'},
data: {
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"enableSmartTap":false,"id":"","imageModulesData":[{"id":"","mainImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}}}],"linksModuleData":{"uris":[{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}]},"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"viewUnlockRequirement":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"enableSmartTap": @NO,
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } } } ],
@"linksModuleData": @{ @"uris": @[ @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } ] },
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"redemptionIssuers": @[ ],
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"viewUnlockRequirement": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericClass" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericClass",
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([
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'enableSmartTap' => null,
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
]
],
'linksModuleData' => [
'uris' => [
[
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'viewUnlockRequirement' => ''
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/genericClass', [
'body' => '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericClass');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'enableSmartTap' => null,
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
]
],
'linksModuleData' => [
'uris' => [
[
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'viewUnlockRequirement' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'enableSmartTap' => null,
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
]
],
'linksModuleData' => [
'uris' => [
[
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'viewUnlockRequirement' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/genericClass');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/genericClass", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericClass"
payload = {
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": False,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": { "uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
] },
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericClass"
payload <- "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/genericClass') do |req|
req.body = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericClass";
let payload = json!({
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"enableSmartTap": false,
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
})
})
),
"linksModuleData": json!({"uris": (
json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})
)}),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"viewUnlockRequirement": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/genericClass \
--header 'content-type: application/json' \
--data '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}'
echo '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}' | \
http POST {{baseUrl}}/walletobjects/v1/genericClass \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "enableSmartTap": false,\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n }\n }\n ],\n "linksModuleData": {\n "uris": [\n {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n ]\n },\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "viewUnlockRequirement": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericClass
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"enableSmartTap": false,
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
]
]
],
"linksModuleData": ["uris": [
[
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]
]],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"viewUnlockRequirement": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.genericclass.list
{{baseUrl}}/walletobjects/v1/genericClass
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericClass");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/genericClass")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericClass"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericClass"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericClass");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericClass"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/genericClass HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/genericClass")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericClass"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/genericClass")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/genericClass');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericClass',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericClass',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericClass'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/genericClass');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericClass" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericClass",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/genericClass');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericClass');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/genericClass');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericClass' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericClass' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/genericClass")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericClass"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericClass"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/genericClass') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericClass";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/genericClass
http GET {{baseUrl}}/walletobjects/v1/genericClass
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericClass
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.genericclass.patch
{{baseUrl}}/walletobjects/v1/genericClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId" {:content-type :json
:form-params {:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:enableSmartTap false
:id ""
:imageModulesData [{:id ""
:mainImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}}]
:linksModuleData {:uris [{:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}]}
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:viewUnlockRequirement ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"),
Content = new StringContent("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
payload := strings.NewReader("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/genericClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2180
{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
.asString();
const data = JSON.stringify({
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
}
}
],
linksModuleData: {
uris: [
{
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
]
},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
viewUnlockRequirement: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"enableSmartTap":false,"id":"","imageModulesData":[{"id":"","mainImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}}}],"linksModuleData":{"uris":[{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}]},"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"viewUnlockRequirement":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "enableSmartTap": false,\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n }\n }\n ],\n "linksModuleData": {\n "uris": [\n {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n ]\n },\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "viewUnlockRequirement": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
}
}
],
linksModuleData: {
uris: [
{
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
]
},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
viewUnlockRequirement: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"enableSmartTap":false,"id":"","imageModulesData":[{"id":"","mainImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}}}],"linksModuleData":{"uris":[{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}]},"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"viewUnlockRequirement":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"enableSmartTap": @NO,
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } } } ],
@"linksModuleData": @{ @"uris": @[ @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } ] },
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"redemptionIssuers": @[ ],
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"viewUnlockRequirement": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'enableSmartTap' => null,
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
]
],
'linksModuleData' => [
'uris' => [
[
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'viewUnlockRequirement' => ''
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId', [
'body' => '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'enableSmartTap' => null,
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
]
],
'linksModuleData' => [
'uris' => [
[
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'viewUnlockRequirement' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'enableSmartTap' => null,
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
]
],
'linksModuleData' => [
'uris' => [
[
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'viewUnlockRequirement' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/genericClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
payload = {
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": False,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": { "uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
] },
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
payload <- "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/genericClass/:resourceId') do |req|
req.body = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId";
let payload = json!({
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"enableSmartTap": false,
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
})
})
),
"linksModuleData": json!({"uris": (
json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})
)}),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"viewUnlockRequirement": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/genericClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}'
echo '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/genericClass/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "enableSmartTap": false,\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n }\n }\n ],\n "linksModuleData": {\n "uris": [\n {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n ]\n },\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "viewUnlockRequirement": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"enableSmartTap": false,
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
]
]
],
"linksModuleData": ["uris": [
[
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]
]],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"viewUnlockRequirement": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.genericclass.update
{{baseUrl}}/walletobjects/v1/genericClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId" {:content-type :json
:form-params {:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:enableSmartTap false
:id ""
:imageModulesData [{:id ""
:mainImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}}]
:linksModuleData {:uris [{:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}]}
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:viewUnlockRequirement ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"),
Content = new StringContent("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
payload := strings.NewReader("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/genericClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2180
{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
.asString();
const data = JSON.stringify({
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
}
}
],
linksModuleData: {
uris: [
{
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
]
},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
viewUnlockRequirement: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"enableSmartTap":false,"id":"","imageModulesData":[{"id":"","mainImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}}}],"linksModuleData":{"uris":[{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}]},"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"viewUnlockRequirement":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "enableSmartTap": false,\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n }\n }\n ],\n "linksModuleData": {\n "uris": [\n {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n ]\n },\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "viewUnlockRequirement": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
}
}
],
linksModuleData: {
uris: [
{
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
]
},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
viewUnlockRequirement: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
enableSmartTap: false,
id: '',
imageModulesData: [
{
id: '',
mainImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
}
}
],
linksModuleData: {uris: [{description: '', id: '', kind: '', localizedDescription: {}, uri: ''}]},
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
viewUnlockRequirement: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"enableSmartTap":false,"id":"","imageModulesData":[{"id":"","mainImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}}}],"linksModuleData":{"uris":[{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}]},"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"viewUnlockRequirement":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"enableSmartTap": @NO,
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } } } ],
@"linksModuleData": @{ @"uris": @[ @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } ] },
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"redemptionIssuers": @[ ],
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"viewUnlockRequirement": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericClass/:resourceId",
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([
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'enableSmartTap' => null,
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
]
],
'linksModuleData' => [
'uris' => [
[
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'viewUnlockRequirement' => ''
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId', [
'body' => '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'enableSmartTap' => null,
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
]
],
'linksModuleData' => [
'uris' => [
[
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'viewUnlockRequirement' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'enableSmartTap' => null,
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
]
],
'linksModuleData' => [
'uris' => [
[
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'viewUnlockRequirement' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/genericClass/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/genericClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
payload = {
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": False,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": { "uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
] },
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId"
payload <- "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/genericClass/:resourceId') do |req|
req.body = "{\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"enableSmartTap\": false,\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n }\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n ]\n },\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"viewUnlockRequirement\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId";
let payload = json!({
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"enableSmartTap": false,
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
})
})
),
"linksModuleData": json!({"uris": (
json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})
)}),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"viewUnlockRequirement": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/genericClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}'
echo '{
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"enableSmartTap": false,
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
}
}
],
"linksModuleData": {
"uris": [
{
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
]
},
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"viewUnlockRequirement": ""
}' | \
http PUT {{baseUrl}}/walletobjects/v1/genericClass/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "enableSmartTap": false,\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n }\n }\n ],\n "linksModuleData": {\n "uris": [\n {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n ]\n },\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "viewUnlockRequirement": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"enableSmartTap": false,
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
]
]
],
"linksModuleData": ["uris": [
[
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]
]],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"viewUnlockRequirement": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.genericobject.get
{{baseUrl}}/walletobjects/v1/genericObject/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/genericObject/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericObject/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/genericObject/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/genericObject/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/genericObject/:resourceId
http GET {{baseUrl}}/walletobjects/v1/genericObject/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericObject/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.genericobject.insert
{{baseUrl}}/walletobjects/v1/genericObject
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericObject");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/genericObject" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:cardTitle {}
:classId ""
:genericType ""
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasUsers false
:header {}
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:linksModuleData {:uris [{}]}
:logo {}
:notifications {:expiryNotification {:enableNotification false}
:upcomingNotification {:enableNotification false}}
:passConstraints {:screenshotEligibility ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:subheader {}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:validTimeInterval {:end {:date ""}
:kind ""
:start {}}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericObject"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericObject"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericObject");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericObject"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/genericObject HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2130
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/genericObject")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericObject"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/genericObject")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
linksModuleData: {
uris: [
{}
]
},
logo: {},
notifications: {
expiryNotification: {
enableNotification: false
},
upcomingNotification: {
enableNotification: false
}
},
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
validTimeInterval: {
end: {
date: ''
},
kind: '',
start: {}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/genericObject');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/genericObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardTitle":{},"classId":"","genericType":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasUsers":false,"header":{},"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{"id":"","mainImage":{}}],"linksModuleData":{"uris":[{}]},"logo":{},"notifications":{"expiryNotification":{"enableNotification":false},"upcomingNotification":{"enableNotification":false}},"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","subheader":{},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"validTimeInterval":{"end":{"date":""},"kind":"","start":{}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericObject',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardTitle": {},\n "classId": "",\n "genericType": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasUsers": false,\n "header": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "logo": {},\n "notifications": {\n "expiryNotification": {\n "enableNotification": false\n },\n "upcomingNotification": {\n "enableNotification": false\n }\n },\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "subheader": {},\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "validTimeInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericObject',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/genericObject',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/genericObject');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
linksModuleData: {
uris: [
{}
]
},
logo: {},
notifications: {
expiryNotification: {
enableNotification: false
},
upcomingNotification: {
enableNotification: false
}
},
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
validTimeInterval: {
end: {
date: ''
},
kind: '',
start: {}
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/genericObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardTitle":{},"classId":"","genericType":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasUsers":false,"header":{},"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{"id":"","mainImage":{}}],"linksModuleData":{"uris":[{}]},"logo":{},"notifications":{"expiryNotification":{"enableNotification":false},"upcomingNotification":{"enableNotification":false}},"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","subheader":{},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"validTimeInterval":{"end":{"date":""},"kind":"","start":{}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"cardTitle": @{ },
@"classId": @"",
@"genericType": @"",
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasUsers": @NO,
@"header": @{ },
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"logo": @{ },
@"notifications": @{ @"expiryNotification": @{ @"enableNotification": @NO }, @"upcomingNotification": @{ @"enableNotification": @NO } },
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"subheader": @{ },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"validTimeInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericObject" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericObject",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardTitle' => [
],
'classId' => '',
'genericType' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasUsers' => null,
'header' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'linksModuleData' => [
'uris' => [
[
]
]
],
'logo' => [
],
'notifications' => [
'expiryNotification' => [
'enableNotification' => null
],
'upcomingNotification' => [
'enableNotification' => null
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'subheader' => [
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'validTimeInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/genericObject', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericObject');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardTitle' => [
],
'classId' => '',
'genericType' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasUsers' => null,
'header' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'linksModuleData' => [
'uris' => [
[
]
]
],
'logo' => [
],
'notifications' => [
'expiryNotification' => [
'enableNotification' => null
],
'upcomingNotification' => [
'enableNotification' => null
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'subheader' => [
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'validTimeInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardTitle' => [
],
'classId' => '',
'genericType' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasUsers' => null,
'header' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'linksModuleData' => [
'uris' => [
[
]
]
],
'logo' => [
],
'notifications' => [
'expiryNotification' => [
'enableNotification' => null
],
'upcomingNotification' => [
'enableNotification' => null
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'subheader' => [
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'validTimeInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/genericObject');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/genericObject", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericObject"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": False,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": { "uris": [{}] },
"logo": {},
"notifications": {
"expiryNotification": { "enableNotification": False },
"upcomingNotification": { "enableNotification": False }
},
"passConstraints": { "screenshotEligibility": "" },
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericObject"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/genericObject') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericObject";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"cardTitle": json!({}),
"classId": "",
"genericType": "",
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasUsers": false,
"header": json!({}),
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"linksModuleData": json!({"uris": (json!({}))}),
"logo": json!({}),
"notifications": json!({
"expiryNotification": json!({"enableNotification": false}),
"upcomingNotification": json!({"enableNotification": false})
}),
"passConstraints": json!({"screenshotEligibility": ""}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"subheader": json!({}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"validTimeInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/genericObject \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/genericObject \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardTitle": {},\n "classId": "",\n "genericType": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasUsers": false,\n "header": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "logo": {},\n "notifications": {\n "expiryNotification": {\n "enableNotification": false\n },\n "upcomingNotification": {\n "enableNotification": false\n }\n },\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "subheader": {},\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "validTimeInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericObject
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"cardTitle": [],
"classId": "",
"genericType": "",
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasUsers": false,
"header": [],
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"linksModuleData": ["uris": [[]]],
"logo": [],
"notifications": [
"expiryNotification": ["enableNotification": false],
"upcomingNotification": ["enableNotification": false]
],
"passConstraints": ["screenshotEligibility": ""],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"subheader": [],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"validTimeInterval": [
"end": ["date": ""],
"kind": "",
"start": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.genericobject.list
{{baseUrl}}/walletobjects/v1/genericObject
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericObject");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/genericObject")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericObject"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericObject"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericObject");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericObject"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/genericObject HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/genericObject")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericObject"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/genericObject")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/genericObject');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericObject',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericObject',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericObject'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/genericObject');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/genericObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericObject" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericObject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/genericObject');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericObject');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/genericObject');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericObject' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericObject' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/genericObject")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericObject"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericObject"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/genericObject') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericObject";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/genericObject
http GET {{baseUrl}}/walletobjects/v1/genericObject
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericObject
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.genericobject.patch
{{baseUrl}}/walletobjects/v1/genericObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:cardTitle {}
:classId ""
:genericType ""
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasUsers false
:header {}
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:linksModuleData {:uris [{}]}
:logo {}
:notifications {:expiryNotification {:enableNotification false}
:upcomingNotification {:enableNotification false}}
:passConstraints {:screenshotEligibility ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:subheader {}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:validTimeInterval {:end {:date ""}
:kind ""
:start {}}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/genericObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2130
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
linksModuleData: {
uris: [
{}
]
},
logo: {},
notifications: {
expiryNotification: {
enableNotification: false
},
upcomingNotification: {
enableNotification: false
}
},
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
validTimeInterval: {
end: {
date: ''
},
kind: '',
start: {}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardTitle":{},"classId":"","genericType":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasUsers":false,"header":{},"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{"id":"","mainImage":{}}],"linksModuleData":{"uris":[{}]},"logo":{},"notifications":{"expiryNotification":{"enableNotification":false},"upcomingNotification":{"enableNotification":false}},"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","subheader":{},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"validTimeInterval":{"end":{"date":""},"kind":"","start":{}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardTitle": {},\n "classId": "",\n "genericType": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasUsers": false,\n "header": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "logo": {},\n "notifications": {\n "expiryNotification": {\n "enableNotification": false\n },\n "upcomingNotification": {\n "enableNotification": false\n }\n },\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "subheader": {},\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "validTimeInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
linksModuleData: {
uris: [
{}
]
},
logo: {},
notifications: {
expiryNotification: {
enableNotification: false
},
upcomingNotification: {
enableNotification: false
}
},
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
validTimeInterval: {
end: {
date: ''
},
kind: '',
start: {}
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardTitle":{},"classId":"","genericType":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasUsers":false,"header":{},"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{"id":"","mainImage":{}}],"linksModuleData":{"uris":[{}]},"logo":{},"notifications":{"expiryNotification":{"enableNotification":false},"upcomingNotification":{"enableNotification":false}},"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","subheader":{},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"validTimeInterval":{"end":{"date":""},"kind":"","start":{}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"cardTitle": @{ },
@"classId": @"",
@"genericType": @"",
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasUsers": @NO,
@"header": @{ },
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"logo": @{ },
@"notifications": @{ @"expiryNotification": @{ @"enableNotification": @NO }, @"upcomingNotification": @{ @"enableNotification": @NO } },
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"subheader": @{ },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"validTimeInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardTitle' => [
],
'classId' => '',
'genericType' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasUsers' => null,
'header' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'linksModuleData' => [
'uris' => [
[
]
]
],
'logo' => [
],
'notifications' => [
'expiryNotification' => [
'enableNotification' => null
],
'upcomingNotification' => [
'enableNotification' => null
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'subheader' => [
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'validTimeInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
]
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardTitle' => [
],
'classId' => '',
'genericType' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasUsers' => null,
'header' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'linksModuleData' => [
'uris' => [
[
]
]
],
'logo' => [
],
'notifications' => [
'expiryNotification' => [
'enableNotification' => null
],
'upcomingNotification' => [
'enableNotification' => null
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'subheader' => [
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'validTimeInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardTitle' => [
],
'classId' => '',
'genericType' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasUsers' => null,
'header' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'linksModuleData' => [
'uris' => [
[
]
]
],
'logo' => [
],
'notifications' => [
'expiryNotification' => [
'enableNotification' => null
],
'upcomingNotification' => [
'enableNotification' => null
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'subheader' => [
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'validTimeInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/genericObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": False,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": { "uris": [{}] },
"logo": {},
"notifications": {
"expiryNotification": { "enableNotification": False },
"upcomingNotification": { "enableNotification": False }
},
"passConstraints": { "screenshotEligibility": "" },
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/genericObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"cardTitle": json!({}),
"classId": "",
"genericType": "",
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasUsers": false,
"header": json!({}),
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"linksModuleData": json!({"uris": (json!({}))}),
"logo": json!({}),
"notifications": json!({
"expiryNotification": json!({"enableNotification": false}),
"upcomingNotification": json!({"enableNotification": false})
}),
"passConstraints": json!({"screenshotEligibility": ""}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"subheader": json!({}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"validTimeInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/genericObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/genericObject/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardTitle": {},\n "classId": "",\n "genericType": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasUsers": false,\n "header": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "logo": {},\n "notifications": {\n "expiryNotification": {\n "enableNotification": false\n },\n "upcomingNotification": {\n "enableNotification": false\n }\n },\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "subheader": {},\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "validTimeInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"cardTitle": [],
"classId": "",
"genericType": "",
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasUsers": false,
"header": [],
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"linksModuleData": ["uris": [[]]],
"logo": [],
"notifications": [
"expiryNotification": ["enableNotification": false],
"upcomingNotification": ["enableNotification": false]
],
"passConstraints": ["screenshotEligibility": ""],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"subheader": [],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"validTimeInterval": [
"end": ["date": ""],
"kind": "",
"start": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.genericobject.update
{{baseUrl}}/walletobjects/v1/genericObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:cardTitle {}
:classId ""
:genericType ""
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasUsers false
:header {}
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:linksModuleData {:uris [{}]}
:logo {}
:notifications {:expiryNotification {:enableNotification false}
:upcomingNotification {:enableNotification false}}
:passConstraints {:screenshotEligibility ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:subheader {}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:validTimeInterval {:end {:date ""}
:kind ""
:start {}}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/genericObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2130
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
linksModuleData: {
uris: [
{}
]
},
logo: {},
notifications: {
expiryNotification: {
enableNotification: false
},
upcomingNotification: {
enableNotification: false
}
},
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
validTimeInterval: {
end: {
date: ''
},
kind: '',
start: {}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardTitle":{},"classId":"","genericType":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasUsers":false,"header":{},"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{"id":"","mainImage":{}}],"linksModuleData":{"uris":[{}]},"logo":{},"notifications":{"expiryNotification":{"enableNotification":false},"upcomingNotification":{"enableNotification":false}},"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","subheader":{},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"validTimeInterval":{"end":{"date":""},"kind":"","start":{}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardTitle": {},\n "classId": "",\n "genericType": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasUsers": false,\n "header": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "logo": {},\n "notifications": {\n "expiryNotification": {\n "enableNotification": false\n },\n "upcomingNotification": {\n "enableNotification": false\n }\n },\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "subheader": {},\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "validTimeInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/genericObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
linksModuleData: {
uris: [
{}
]
},
logo: {},
notifications: {
expiryNotification: {
enableNotification: false
},
upcomingNotification: {
enableNotification: false
}
},
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
validTimeInterval: {
end: {
date: ''
},
kind: '',
start: {}
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardTitle: {},
classId: '',
genericType: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasUsers: false,
header: {},
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{id: '', mainImage: {}}],
linksModuleData: {uris: [{}]},
logo: {},
notifications: {
expiryNotification: {enableNotification: false},
upcomingNotification: {enableNotification: false}
},
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
subheader: {},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
validTimeInterval: {end: {date: ''}, kind: '', start: {}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardTitle":{},"classId":"","genericType":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasUsers":false,"header":{},"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{"id":"","mainImage":{}}],"linksModuleData":{"uris":[{}]},"logo":{},"notifications":{"expiryNotification":{"enableNotification":false},"upcomingNotification":{"enableNotification":false}},"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","subheader":{},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"validTimeInterval":{"end":{"date":""},"kind":"","start":{}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"cardTitle": @{ },
@"classId": @"",
@"genericType": @"",
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasUsers": @NO,
@"header": @{ },
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"logo": @{ },
@"notifications": @{ @"expiryNotification": @{ @"enableNotification": @NO }, @"upcomingNotification": @{ @"enableNotification": @NO } },
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"subheader": @{ },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"validTimeInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/genericObject/:resourceId",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardTitle' => [
],
'classId' => '',
'genericType' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasUsers' => null,
'header' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'linksModuleData' => [
'uris' => [
[
]
]
],
'logo' => [
],
'notifications' => [
'expiryNotification' => [
'enableNotification' => null
],
'upcomingNotification' => [
'enableNotification' => null
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'subheader' => [
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'validTimeInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
]
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardTitle' => [
],
'classId' => '',
'genericType' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasUsers' => null,
'header' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'linksModuleData' => [
'uris' => [
[
]
]
],
'logo' => [
],
'notifications' => [
'expiryNotification' => [
'enableNotification' => null
],
'upcomingNotification' => [
'enableNotification' => null
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'subheader' => [
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'validTimeInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardTitle' => [
],
'classId' => '',
'genericType' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasUsers' => null,
'header' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'linksModuleData' => [
'uris' => [
[
]
]
],
'logo' => [
],
'notifications' => [
'expiryNotification' => [
'enableNotification' => null
],
'upcomingNotification' => [
'enableNotification' => null
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'subheader' => [
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'validTimeInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/genericObject/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/genericObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/genericObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": False,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": { "uris": [{}] },
"logo": {},
"notifications": {
"expiryNotification": { "enableNotification": False },
"upcomingNotification": { "enableNotification": False }
},
"passConstraints": { "screenshotEligibility": "" },
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/genericObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardTitle\": {},\n \"classId\": \"\",\n \"genericType\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasUsers\": false,\n \"header\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"logo\": {},\n \"notifications\": {\n \"expiryNotification\": {\n \"enableNotification\": false\n },\n \"upcomingNotification\": {\n \"enableNotification\": false\n }\n },\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"subheader\": {},\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"validTimeInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"cardTitle": json!({}),
"classId": "",
"genericType": "",
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasUsers": false,
"header": json!({}),
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"linksModuleData": json!({"uris": (json!({}))}),
"logo": json!({}),
"notifications": json!({
"expiryNotification": json!({"enableNotification": false}),
"upcomingNotification": json!({"enableNotification": false})
}),
"passConstraints": json!({"screenshotEligibility": ""}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"subheader": json!({}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"validTimeInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/genericObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardTitle": {},
"classId": "",
"genericType": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasUsers": false,
"header": {},
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"linksModuleData": {
"uris": [
{}
]
},
"logo": {},
"notifications": {
"expiryNotification": {
"enableNotification": false
},
"upcomingNotification": {
"enableNotification": false
}
},
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"subheader": {},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"validTimeInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
}
}' | \
http PUT {{baseUrl}}/walletobjects/v1/genericObject/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardTitle": {},\n "classId": "",\n "genericType": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasUsers": false,\n "header": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "logo": {},\n "notifications": {\n "expiryNotification": {\n "enableNotification": false\n },\n "upcomingNotification": {\n "enableNotification": false\n }\n },\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "subheader": {},\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "validTimeInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/genericObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"cardTitle": [],
"classId": "",
"genericType": "",
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasUsers": false,
"header": [],
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"linksModuleData": ["uris": [[]]],
"logo": [],
"notifications": [
"expiryNotification": ["enableNotification": false],
"upcomingNotification": ["enableNotification": false]
],
"passConstraints": ["screenshotEligibility": ""],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"subheader": [],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"validTimeInterval": [
"end": ["date": ""],
"kind": "",
"start": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/genericObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.giftcardclass.addmessage
{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/giftCardClass/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardClass/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/giftCardClass/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/giftCardClass/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.giftcardclass.get
{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/giftCardClass/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardClass/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/giftCardClass/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/giftCardClass/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId
http GET {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.giftcardclass.insert
{{baseUrl}}/walletobjects/v1/giftCardClass
BODY json
{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardClass");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/giftCardClass" {:content-type :json
:form-params {:allowBarcodeRedemption false
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:cardNumberLabel ""
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:enableSmartTap false
:eventNumberLabel ""
:heroImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedCardNumberLabel {}
:localizedEventNumberLabel {}
:localizedIssuerName {}
:localizedMerchantName {}
:localizedPinLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:merchantName ""
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:pinLabel ""
:programLogo {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardClass"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardClass"),
Content = new StringContent("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardClass");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardClass"
payload := strings.NewReader("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/giftCardClass HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3329
{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/giftCardClass")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardClass"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/giftCardClass")
.header("content-type", "application/json")
.body("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/giftCardClass');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass',
headers: {'content-type': 'application/json'},
data: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardClass',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardClass',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass',
headers: {'content-type': 'application/json'},
body: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/giftCardClass');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass',
headers: {'content-type': 'application/json'},
data: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowBarcodeRedemption": @NO,
@"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"cardNumberLabel": @"",
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"enableSmartTap": @NO,
@"eventNumberLabel": @"",
@"heroImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedCardNumberLabel": @{ },
@"localizedEventNumberLabel": @{ },
@"localizedIssuerName": @{ },
@"localizedMerchantName": @{ },
@"localizedPinLabel": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"merchantName": @"",
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"pinLabel": @"",
@"programLogo": @{ },
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardClass" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardClass",
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([
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/giftCardClass', [
'body' => '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardClass');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardClass');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/giftCardClass", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardClass"
payload = {
"allowBarcodeRedemption": False,
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": False,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardClass"
payload <- "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/giftCardClass') do |req|
req.body = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardClass";
let payload = json!({
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"cardNumberLabel": "",
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedCardNumberLabel": json!({}),
"localizedEventNumberLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedMerchantName": json!({}),
"localizedPinLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"merchantName": "",
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/giftCardClass \
--header 'content-type: application/json' \
--data '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http POST {{baseUrl}}/walletobjects/v1/giftCardClass \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardClass
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"cardNumberLabel": "",
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedCardNumberLabel": [],
"localizedEventNumberLabel": [],
"localizedIssuerName": [],
"localizedMerchantName": [],
"localizedPinLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"merchantName": "",
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.giftcardclass.list
{{baseUrl}}/walletobjects/v1/giftCardClass
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardClass");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/giftCardClass")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardClass"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardClass"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardClass");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardClass"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/giftCardClass HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/giftCardClass")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardClass"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/giftCardClass")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/giftCardClass');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardClass',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardClass',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/giftCardClass');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardClass" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardClass",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/giftCardClass');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardClass');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardClass');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/giftCardClass")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardClass"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardClass"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/giftCardClass') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardClass";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/giftCardClass
http GET {{baseUrl}}/walletobjects/v1/giftCardClass
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardClass
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.giftcardclass.patch
{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId" {:content-type :json
:form-params {:allowBarcodeRedemption false
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:cardNumberLabel ""
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:enableSmartTap false
:eventNumberLabel ""
:heroImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedCardNumberLabel {}
:localizedEventNumberLabel {}
:localizedIssuerName {}
:localizedMerchantName {}
:localizedPinLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:merchantName ""
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:pinLabel ""
:programLogo {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"),
Content = new StringContent("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
payload := strings.NewReader("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/giftCardClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3329
{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowBarcodeRedemption": @NO,
@"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"cardNumberLabel": @"",
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"enableSmartTap": @NO,
@"eventNumberLabel": @"",
@"heroImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedCardNumberLabel": @{ },
@"localizedEventNumberLabel": @{ },
@"localizedIssuerName": @{ },
@"localizedMerchantName": @{ },
@"localizedPinLabel": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"merchantName": @"",
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"pinLabel": @"",
@"programLogo": @{ },
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId', [
'body' => '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/giftCardClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
payload = {
"allowBarcodeRedemption": False,
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": False,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
payload <- "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/giftCardClass/:resourceId') do |req|
req.body = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId";
let payload = json!({
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"cardNumberLabel": "",
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedCardNumberLabel": json!({}),
"localizedEventNumberLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedMerchantName": json!({}),
"localizedPinLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"merchantName": "",
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"cardNumberLabel": "",
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedCardNumberLabel": [],
"localizedEventNumberLabel": [],
"localizedIssuerName": [],
"localizedMerchantName": [],
"localizedPinLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"merchantName": "",
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.giftcardclass.update
{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId" {:content-type :json
:form-params {:allowBarcodeRedemption false
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:cardNumberLabel ""
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:enableSmartTap false
:eventNumberLabel ""
:heroImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedCardNumberLabel {}
:localizedEventNumberLabel {}
:localizedIssuerName {}
:localizedMerchantName {}
:localizedPinLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:merchantName ""
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:pinLabel ""
:programLogo {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"),
Content = new StringContent("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
payload := strings.NewReader("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/giftCardClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3329
{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowBarcodeRedemption": @NO,
@"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"cardNumberLabel": @"",
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"enableSmartTap": @NO,
@"eventNumberLabel": @"",
@"heroImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedCardNumberLabel": @{ },
@"localizedEventNumberLabel": @{ },
@"localizedIssuerName": @{ },
@"localizedMerchantName": @{ },
@"localizedPinLabel": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"merchantName": @"",
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"pinLabel": @"",
@"programLogo": @{ },
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId",
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([
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId', [
'body' => '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/giftCardClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
payload = {
"allowBarcodeRedemption": False,
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": False,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId"
payload <- "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/giftCardClass/:resourceId') do |req|
req.body = "{\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId";
let payload = json!({
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"cardNumberLabel": "",
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedCardNumberLabel": json!({}),
"localizedEventNumberLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedMerchantName": json!({}),
"localizedPinLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"merchantName": "",
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PUT {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"cardNumberLabel": "",
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedCardNumberLabel": [],
"localizedEventNumberLabel": [],
"localizedIssuerName": [],
"localizedMerchantName": [],
"localizedPinLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"merchantName": "",
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.giftcardobject.addmessage
{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/giftCardObject/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardObject/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/giftCardObject/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/giftCardObject/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.giftcardobject.get
{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/giftCardObject/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardObject/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/giftCardObject/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/giftCardObject/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId
http GET {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.giftcardobject.insert
{{baseUrl}}/walletobjects/v1/giftCardObject
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardObject");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/giftCardObject" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:balance {:currencyCode ""
:kind ""
:micros ""}
:balanceUpdateTime {:date ""}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:cardNumber ""
:classId ""
:classReference {:allowBarcodeRedemption false
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:cardNumberLabel ""
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:enableSmartTap false
:eventNumberLabel ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedCardNumberLabel {}
:localizedEventNumberLabel {}
:localizedIssuerName {}
:localizedMerchantName {}
:localizedPinLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:merchantName ""
:messages [{:body ""
:displayInterval {:end {}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:pinLabel ""
:programLogo {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:eventNumber ""
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:pin ""
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardObject"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardObject"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardObject");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardObject"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/giftCardObject HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5144
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/giftCardObject")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardObject"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/giftCardObject")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {
currencyCode: '',
kind: '',
micros: ''
},
balanceUpdateTime: {
date: ''
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/giftCardObject');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"balance":{"currencyCode":"","kind":"","micros":""},"balanceUpdateTime":{"date":""},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardNumber":"","classId":"","classReference":{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"eventNumber":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"pin":"","rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardObject',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "balance": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "balanceUpdateTime": {\n "date": ""\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardNumber": "",\n "classId": "",\n "classReference": {\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {},\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "eventNumber": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "pin": "",\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardObject',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/giftCardObject');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {
currencyCode: '',
kind: '',
micros: ''
},
balanceUpdateTime: {
date: ''
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"balance":{"currencyCode":"","kind":"","micros":""},"balanceUpdateTime":{"date":""},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardNumber":"","classId":"","classReference":{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"eventNumber":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"pin":"","rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"balance": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" },
@"balanceUpdateTime": @{ @"date": @"" },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"cardNumber": @"",
@"classId": @"",
@"classReference": @{ @"allowBarcodeRedemption": @NO, @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"cardNumberLabel": @"", @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"enableSmartTap": @NO, @"eventNumberLabel": @"", @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedCardNumberLabel": @{ }, @"localizedEventNumberLabel": @{ }, @"localizedIssuerName": @{ }, @"localizedMerchantName": @{ }, @"localizedPinLabel": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"merchantName": @"", @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"pinLabel": @"", @"programLogo": @{ }, @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"eventNumber": @"",
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"pin": @"",
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardObject" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardObject",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'balance' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'balanceUpdateTime' => [
'date' => ''
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardNumber' => '',
'classId' => '',
'classReference' => [
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'eventNumber' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'pin' => '',
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/giftCardObject', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardObject');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'balance' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'balanceUpdateTime' => [
'date' => ''
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardNumber' => '',
'classId' => '',
'classReference' => [
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'eventNumber' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'pin' => '',
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'balance' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'balanceUpdateTime' => [
'date' => ''
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardNumber' => '',
'classId' => '',
'classReference' => [
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'eventNumber' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'pin' => '',
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardObject');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/giftCardObject", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardObject"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": { "date": "" },
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": False,
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": False,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardObject"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/giftCardObject') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardObject";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"balance": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"balanceUpdateTime": json!({"date": ""}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"cardNumber": "",
"classId": "",
"classReference": json!({
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"cardNumberLabel": "",
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedCardNumberLabel": json!({}),
"localizedEventNumberLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedMerchantName": json!({}),
"localizedPinLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"merchantName": "",
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"pin": "",
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/giftCardObject \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http POST {{baseUrl}}/walletobjects/v1/giftCardObject \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "balance": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "balanceUpdateTime": {\n "date": ""\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardNumber": "",\n "classId": "",\n "classReference": {\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {},\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "eventNumber": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "pin": "",\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardObject
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"balance": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"balanceUpdateTime": ["date": ""],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"cardNumber": "",
"classId": "",
"classReference": [
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"cardNumberLabel": "",
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedCardNumberLabel": [],
"localizedEventNumberLabel": [],
"localizedIssuerName": [],
"localizedMerchantName": [],
"localizedPinLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"merchantName": "",
"messages": [
[
"body": "",
"displayInterval": [
"end": [],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"pin": "",
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.giftcardobject.list
{{baseUrl}}/walletobjects/v1/giftCardObject
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardObject");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/giftCardObject")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardObject"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardObject"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardObject");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardObject"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/giftCardObject HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/giftCardObject")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardObject"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/giftCardObject")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/giftCardObject');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardObject',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardObject',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/giftCardObject');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardObject" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardObject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/giftCardObject');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardObject');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardObject');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/giftCardObject")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardObject"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardObject"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/giftCardObject') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardObject";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/giftCardObject
http GET {{baseUrl}}/walletobjects/v1/giftCardObject
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardObject
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.giftcardobject.patch
{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:balance {:currencyCode ""
:kind ""
:micros ""}
:balanceUpdateTime {:date ""}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:cardNumber ""
:classId ""
:classReference {:allowBarcodeRedemption false
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:cardNumberLabel ""
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:enableSmartTap false
:eventNumberLabel ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedCardNumberLabel {}
:localizedEventNumberLabel {}
:localizedIssuerName {}
:localizedMerchantName {}
:localizedPinLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:merchantName ""
:messages [{:body ""
:displayInterval {:end {}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:pinLabel ""
:programLogo {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:eventNumber ""
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:pin ""
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/giftCardObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5144
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {
currencyCode: '',
kind: '',
micros: ''
},
balanceUpdateTime: {
date: ''
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"balance":{"currencyCode":"","kind":"","micros":""},"balanceUpdateTime":{"date":""},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardNumber":"","classId":"","classReference":{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"eventNumber":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"pin":"","rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "balance": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "balanceUpdateTime": {\n "date": ""\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardNumber": "",\n "classId": "",\n "classReference": {\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {},\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "eventNumber": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "pin": "",\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {
currencyCode: '',
kind: '',
micros: ''
},
balanceUpdateTime: {
date: ''
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"balance":{"currencyCode":"","kind":"","micros":""},"balanceUpdateTime":{"date":""},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardNumber":"","classId":"","classReference":{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"eventNumber":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"pin":"","rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"balance": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" },
@"balanceUpdateTime": @{ @"date": @"" },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"cardNumber": @"",
@"classId": @"",
@"classReference": @{ @"allowBarcodeRedemption": @NO, @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"cardNumberLabel": @"", @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"enableSmartTap": @NO, @"eventNumberLabel": @"", @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedCardNumberLabel": @{ }, @"localizedEventNumberLabel": @{ }, @"localizedIssuerName": @{ }, @"localizedMerchantName": @{ }, @"localizedPinLabel": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"merchantName": @"", @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"pinLabel": @"", @"programLogo": @{ }, @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"eventNumber": @"",
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"pin": @"",
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'balance' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'balanceUpdateTime' => [
'date' => ''
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardNumber' => '',
'classId' => '',
'classReference' => [
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'eventNumber' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'pin' => '',
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'balance' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'balanceUpdateTime' => [
'date' => ''
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardNumber' => '',
'classId' => '',
'classReference' => [
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'eventNumber' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'pin' => '',
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'balance' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'balanceUpdateTime' => [
'date' => ''
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardNumber' => '',
'classId' => '',
'classReference' => [
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'eventNumber' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'pin' => '',
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/giftCardObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": { "date": "" },
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": False,
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": False,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/giftCardObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"balance": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"balanceUpdateTime": json!({"date": ""}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"cardNumber": "",
"classId": "",
"classReference": json!({
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"cardNumberLabel": "",
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedCardNumberLabel": json!({}),
"localizedEventNumberLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedMerchantName": json!({}),
"localizedPinLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"merchantName": "",
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"pin": "",
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "balance": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "balanceUpdateTime": {\n "date": ""\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardNumber": "",\n "classId": "",\n "classReference": {\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {},\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "eventNumber": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "pin": "",\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"balance": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"balanceUpdateTime": ["date": ""],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"cardNumber": "",
"classId": "",
"classReference": [
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"cardNumberLabel": "",
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedCardNumberLabel": [],
"localizedEventNumberLabel": [],
"localizedIssuerName": [],
"localizedMerchantName": [],
"localizedPinLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"merchantName": "",
"messages": [
[
"body": "",
"displayInterval": [
"end": [],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"pin": "",
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.giftcardobject.update
{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:balance {:currencyCode ""
:kind ""
:micros ""}
:balanceUpdateTime {:date ""}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:cardNumber ""
:classId ""
:classReference {:allowBarcodeRedemption false
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:cardNumberLabel ""
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:enableSmartTap false
:eventNumberLabel ""
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedCardNumberLabel {}
:localizedEventNumberLabel {}
:localizedIssuerName {}
:localizedMerchantName {}
:localizedPinLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:merchantName ""
:messages [{:body ""
:displayInterval {:end {}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:pinLabel ""
:programLogo {}
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:eventNumber ""
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:pin ""
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/giftCardObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5144
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {
currencyCode: '',
kind: '',
micros: ''
},
balanceUpdateTime: {
date: ''
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"balance":{"currencyCode":"","kind":"","micros":""},"balanceUpdateTime":{"date":""},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardNumber":"","classId":"","classReference":{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"eventNumber":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"pin":"","rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "balance": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "balanceUpdateTime": {\n "date": ""\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardNumber": "",\n "classId": "",\n "classReference": {\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {},\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "eventNumber": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "pin": "",\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/giftCardObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {
currencyCode: '',
kind: '',
micros: ''
},
balanceUpdateTime: {
date: ''
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
merchantName: '',
messages: [
{
body: '',
displayInterval: {
end: {},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
balance: {currencyCode: '', kind: '', micros: ''},
balanceUpdateTime: {date: ''},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
cardNumber: '',
classId: '',
classReference: {
allowBarcodeRedemption: false,
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
cardNumberLabel: '',
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
enableSmartTap: false,
eventNumberLabel: '',
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedCardNumberLabel: {},
localizedEventNumberLabel: {},
localizedIssuerName: {},
localizedMerchantName: {},
localizedPinLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
merchantName: '',
messages: [
{
body: '',
displayInterval: {end: {}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
pinLabel: '',
programLogo: {},
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
eventNumber: '',
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
pin: '',
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"balance":{"currencyCode":"","kind":"","micros":""},"balanceUpdateTime":{"date":""},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"cardNumber":"","classId":"","classReference":{"allowBarcodeRedemption":false,"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"cardNumberLabel":"","classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","enableSmartTap":false,"eventNumberLabel":"","heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedCardNumberLabel":{},"localizedEventNumberLabel":{},"localizedIssuerName":{},"localizedMerchantName":{},"localizedPinLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"merchantName":"","messages":[{"body":"","displayInterval":{"end":{},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","pinLabel":"","programLogo":{},"redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"eventNumber":"","groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"pin":"","rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"balance": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" },
@"balanceUpdateTime": @{ @"date": @"" },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"cardNumber": @"",
@"classId": @"",
@"classReference": @{ @"allowBarcodeRedemption": @NO, @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"cardNumberLabel": @"", @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"enableSmartTap": @NO, @"eventNumberLabel": @"", @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedCardNumberLabel": @{ }, @"localizedEventNumberLabel": @{ }, @"localizedIssuerName": @{ }, @"localizedMerchantName": @{ }, @"localizedPinLabel": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"merchantName": @"", @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"pinLabel": @"", @"programLogo": @{ }, @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"eventNumber": @"",
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"pin": @"",
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'balance' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'balanceUpdateTime' => [
'date' => ''
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardNumber' => '',
'classId' => '',
'classReference' => [
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'eventNumber' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'pin' => '',
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'balance' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'balanceUpdateTime' => [
'date' => ''
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardNumber' => '',
'classId' => '',
'classReference' => [
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'eventNumber' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'pin' => '',
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'balance' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'balanceUpdateTime' => [
'date' => ''
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'cardNumber' => '',
'classId' => '',
'classReference' => [
'allowBarcodeRedemption' => null,
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'cardNumberLabel' => '',
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'enableSmartTap' => null,
'eventNumberLabel' => '',
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedCardNumberLabel' => [
],
'localizedEventNumberLabel' => [
],
'localizedIssuerName' => [
],
'localizedMerchantName' => [
],
'localizedPinLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'merchantName' => '',
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'pinLabel' => '',
'programLogo' => [
],
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'eventNumber' => '',
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'pin' => '',
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/giftCardObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": { "date": "" },
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": False,
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": False,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/giftCardObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"balance\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"balanceUpdateTime\": {\n \"date\": \"\"\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"cardNumber\": \"\",\n \"classId\": \"\",\n \"classReference\": {\n \"allowBarcodeRedemption\": false,\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"cardNumberLabel\": \"\",\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"enableSmartTap\": false,\n \"eventNumberLabel\": \"\",\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedCardNumberLabel\": {},\n \"localizedEventNumberLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedMerchantName\": {},\n \"localizedPinLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"merchantName\": \"\",\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {},\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"pinLabel\": \"\",\n \"programLogo\": {},\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"eventNumber\": \"\",\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"pin\": \"\",\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"balance": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"balanceUpdateTime": json!({"date": ""}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"cardNumber": "",
"classId": "",
"classReference": json!({
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"cardNumberLabel": "",
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedCardNumberLabel": json!({}),
"localizedEventNumberLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedMerchantName": json!({}),
"localizedPinLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"merchantName": "",
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": json!({}),
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"pin": "",
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"balance": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"balanceUpdateTime": {
"date": ""
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"cardNumber": "",
"classId": "",
"classReference": {
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"cardNumberLabel": "",
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedCardNumberLabel": {},
"localizedEventNumberLabel": {},
"localizedIssuerName": {},
"localizedMerchantName": {},
"localizedPinLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"merchantName": "",
"messages": [
{
"body": "",
"displayInterval": {
"end": {},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": {},
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"pin": "",
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http PUT {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "balance": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "balanceUpdateTime": {\n "date": ""\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "cardNumber": "",\n "classId": "",\n "classReference": {\n "allowBarcodeRedemption": false,\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "cardNumberLabel": "",\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "enableSmartTap": false,\n "eventNumberLabel": "",\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedCardNumberLabel": {},\n "localizedEventNumberLabel": {},\n "localizedIssuerName": {},\n "localizedMerchantName": {},\n "localizedPinLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "merchantName": "",\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {},\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "pinLabel": "",\n "programLogo": {},\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "eventNumber": "",\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "pin": "",\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"balance": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"balanceUpdateTime": ["date": ""],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"cardNumber": "",
"classId": "",
"classReference": [
"allowBarcodeRedemption": false,
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"cardNumberLabel": "",
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"enableSmartTap": false,
"eventNumberLabel": "",
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedCardNumberLabel": [],
"localizedEventNumberLabel": [],
"localizedIssuerName": [],
"localizedMerchantName": [],
"localizedPinLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"merchantName": "",
"messages": [
[
"body": "",
"displayInterval": [
"end": [],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"pinLabel": "",
"programLogo": [],
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"eventNumber": "",
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"pin": "",
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/giftCardObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.issuer.get
{{baseUrl}}/walletobjects/v1/issuer/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/issuer/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/issuer/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/issuer/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/issuer/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/issuer/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/issuer/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/issuer/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/issuer/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/issuer/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/issuer/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/issuer/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/issuer/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/issuer/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/issuer/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/issuer/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/issuer/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/issuer/:resourceId
http GET {{baseUrl}}/walletobjects/v1/issuer/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/issuer/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/issuer/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.issuer.insert
{{baseUrl}}/walletobjects/v1/issuer
BODY json
{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/issuer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/issuer" {:content-type :json
:form-params {:contactInfo {:alertsEmails []
:email ""
:name ""
:phone ""}
:homepageUrl ""
:issuerId ""
:name ""
:smartTapMerchantData {:authenticationKeys [{:id 0
:publicKeyPem ""}]
:smartTapMerchantId ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/issuer"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/issuer"),
Content = new StringContent("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/issuer");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/issuer"
payload := strings.NewReader("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/issuer HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 309
{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/issuer")
.setHeader("content-type", "application/json")
.setBody("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/issuer"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/issuer")
.header("content-type", "application/json")
.body("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
contactInfo: {
alertsEmails: [],
email: '',
name: '',
phone: ''
},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {
authenticationKeys: [
{
id: 0,
publicKeyPem: ''
}
],
smartTapMerchantId: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/issuer');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/issuer',
headers: {'content-type': 'application/json'},
data: {
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/issuer';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"contactInfo":{"alertsEmails":[],"email":"","name":"","phone":""},"homepageUrl":"","issuerId":"","name":"","smartTapMerchantData":{"authenticationKeys":[{"id":0,"publicKeyPem":""}],"smartTapMerchantId":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/issuer',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "contactInfo": {\n "alertsEmails": [],\n "email": "",\n "name": "",\n "phone": ""\n },\n "homepageUrl": "",\n "issuerId": "",\n "name": "",\n "smartTapMerchantData": {\n "authenticationKeys": [\n {\n "id": 0,\n "publicKeyPem": ""\n }\n ],\n "smartTapMerchantId": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/issuer',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/issuer',
headers: {'content-type': 'application/json'},
body: {
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/issuer');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
contactInfo: {
alertsEmails: [],
email: '',
name: '',
phone: ''
},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {
authenticationKeys: [
{
id: 0,
publicKeyPem: ''
}
],
smartTapMerchantId: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/issuer',
headers: {'content-type': 'application/json'},
data: {
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/issuer';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"contactInfo":{"alertsEmails":[],"email":"","name":"","phone":""},"homepageUrl":"","issuerId":"","name":"","smartTapMerchantData":{"authenticationKeys":[{"id":0,"publicKeyPem":""}],"smartTapMerchantId":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"contactInfo": @{ @"alertsEmails": @[ ], @"email": @"", @"name": @"", @"phone": @"" },
@"homepageUrl": @"",
@"issuerId": @"",
@"name": @"",
@"smartTapMerchantData": @{ @"authenticationKeys": @[ @{ @"id": @0, @"publicKeyPem": @"" } ], @"smartTapMerchantId": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/issuer"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/issuer" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/issuer",
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([
'contactInfo' => [
'alertsEmails' => [
],
'email' => '',
'name' => '',
'phone' => ''
],
'homepageUrl' => '',
'issuerId' => '',
'name' => '',
'smartTapMerchantData' => [
'authenticationKeys' => [
[
'id' => 0,
'publicKeyPem' => ''
]
],
'smartTapMerchantId' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/issuer', [
'body' => '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/issuer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'contactInfo' => [
'alertsEmails' => [
],
'email' => '',
'name' => '',
'phone' => ''
],
'homepageUrl' => '',
'issuerId' => '',
'name' => '',
'smartTapMerchantData' => [
'authenticationKeys' => [
[
'id' => 0,
'publicKeyPem' => ''
]
],
'smartTapMerchantId' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'contactInfo' => [
'alertsEmails' => [
],
'email' => '',
'name' => '',
'phone' => ''
],
'homepageUrl' => '',
'issuerId' => '',
'name' => '',
'smartTapMerchantData' => [
'authenticationKeys' => [
[
'id' => 0,
'publicKeyPem' => ''
]
],
'smartTapMerchantId' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/issuer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/issuer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/issuer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/issuer", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/issuer"
payload = {
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/issuer"
payload <- "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/issuer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/issuer') do |req|
req.body = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/issuer";
let payload = json!({
"contactInfo": json!({
"alertsEmails": (),
"email": "",
"name": "",
"phone": ""
}),
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": json!({
"authenticationKeys": (
json!({
"id": 0,
"publicKeyPem": ""
})
),
"smartTapMerchantId": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/issuer \
--header 'content-type: application/json' \
--data '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}'
echo '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/issuer \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "contactInfo": {\n "alertsEmails": [],\n "email": "",\n "name": "",\n "phone": ""\n },\n "homepageUrl": "",\n "issuerId": "",\n "name": "",\n "smartTapMerchantData": {\n "authenticationKeys": [\n {\n "id": 0,\n "publicKeyPem": ""\n }\n ],\n "smartTapMerchantId": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/issuer
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"contactInfo": [
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
],
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": [
"authenticationKeys": [
[
"id": 0,
"publicKeyPem": ""
]
],
"smartTapMerchantId": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/issuer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.issuer.list
{{baseUrl}}/walletobjects/v1/issuer
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/issuer");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/issuer")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/issuer"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/issuer"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/issuer");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/issuer"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/issuer HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/issuer")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/issuer"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/issuer")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/issuer');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/issuer'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/issuer';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/issuer',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/issuer',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/issuer'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/issuer');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/issuer'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/issuer';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/issuer"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/issuer" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/issuer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/issuer');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/issuer');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/issuer');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/issuer' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/issuer' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/issuer")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/issuer"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/issuer"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/issuer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/issuer') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/issuer";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/issuer
http GET {{baseUrl}}/walletobjects/v1/issuer
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/issuer
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/issuer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.issuer.patch
{{baseUrl}}/walletobjects/v1/issuer/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/issuer/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/issuer/:resourceId" {:content-type :json
:form-params {:contactInfo {:alertsEmails []
:email ""
:name ""
:phone ""}
:homepageUrl ""
:issuerId ""
:name ""
:smartTapMerchantData {:authenticationKeys [{:id 0
:publicKeyPem ""}]
:smartTapMerchantId ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/issuer/:resourceId"),
Content = new StringContent("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/issuer/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
payload := strings.NewReader("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/issuer/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 309
{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/issuer/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.header("content-type", "application/json")
.body("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
contactInfo: {
alertsEmails: [],
email: '',
name: '',
phone: ''
},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {
authenticationKeys: [
{
id: 0,
publicKeyPem: ''
}
],
smartTapMerchantId: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId',
headers: {'content-type': 'application/json'},
data: {
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/issuer/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"contactInfo":{"alertsEmails":[],"email":"","name":"","phone":""},"homepageUrl":"","issuerId":"","name":"","smartTapMerchantData":{"authenticationKeys":[{"id":0,"publicKeyPem":""}],"smartTapMerchantId":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "contactInfo": {\n "alertsEmails": [],\n "email": "",\n "name": "",\n "phone": ""\n },\n "homepageUrl": "",\n "issuerId": "",\n "name": "",\n "smartTapMerchantData": {\n "authenticationKeys": [\n {\n "id": 0,\n "publicKeyPem": ""\n }\n ],\n "smartTapMerchantId": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/issuer/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId',
headers: {'content-type': 'application/json'},
body: {
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
contactInfo: {
alertsEmails: [],
email: '',
name: '',
phone: ''
},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {
authenticationKeys: [
{
id: 0,
publicKeyPem: ''
}
],
smartTapMerchantId: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId',
headers: {'content-type': 'application/json'},
data: {
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/issuer/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"contactInfo":{"alertsEmails":[],"email":"","name":"","phone":""},"homepageUrl":"","issuerId":"","name":"","smartTapMerchantData":{"authenticationKeys":[{"id":0,"publicKeyPem":""}],"smartTapMerchantId":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"contactInfo": @{ @"alertsEmails": @[ ], @"email": @"", @"name": @"", @"phone": @"" },
@"homepageUrl": @"",
@"issuerId": @"",
@"name": @"",
@"smartTapMerchantData": @{ @"authenticationKeys": @[ @{ @"id": @0, @"publicKeyPem": @"" } ], @"smartTapMerchantId": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/issuer/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/issuer/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/issuer/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'contactInfo' => [
'alertsEmails' => [
],
'email' => '',
'name' => '',
'phone' => ''
],
'homepageUrl' => '',
'issuerId' => '',
'name' => '',
'smartTapMerchantData' => [
'authenticationKeys' => [
[
'id' => 0,
'publicKeyPem' => ''
]
],
'smartTapMerchantId' => ''
]
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/issuer/:resourceId', [
'body' => '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'contactInfo' => [
'alertsEmails' => [
],
'email' => '',
'name' => '',
'phone' => ''
],
'homepageUrl' => '',
'issuerId' => '',
'name' => '',
'smartTapMerchantData' => [
'authenticationKeys' => [
[
'id' => 0,
'publicKeyPem' => ''
]
],
'smartTapMerchantId' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'contactInfo' => [
'alertsEmails' => [
],
'email' => '',
'name' => '',
'phone' => ''
],
'homepageUrl' => '',
'issuerId' => '',
'name' => '',
'smartTapMerchantData' => [
'authenticationKeys' => [
[
'id' => 0,
'publicKeyPem' => ''
]
],
'smartTapMerchantId' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/issuer/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/issuer/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/issuer/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
payload = {
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
payload <- "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/issuer/:resourceId') do |req|
req.body = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/issuer/:resourceId";
let payload = json!({
"contactInfo": json!({
"alertsEmails": (),
"email": "",
"name": "",
"phone": ""
}),
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": json!({
"authenticationKeys": (
json!({
"id": 0,
"publicKeyPem": ""
})
),
"smartTapMerchantId": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/issuer/:resourceId \
--header 'content-type: application/json' \
--data '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}'
echo '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/issuer/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "contactInfo": {\n "alertsEmails": [],\n "email": "",\n "name": "",\n "phone": ""\n },\n "homepageUrl": "",\n "issuerId": "",\n "name": "",\n "smartTapMerchantData": {\n "authenticationKeys": [\n {\n "id": 0,\n "publicKeyPem": ""\n }\n ],\n "smartTapMerchantId": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/issuer/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"contactInfo": [
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
],
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": [
"authenticationKeys": [
[
"id": 0,
"publicKeyPem": ""
]
],
"smartTapMerchantId": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/issuer/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.issuer.update
{{baseUrl}}/walletobjects/v1/issuer/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/issuer/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/issuer/:resourceId" {:content-type :json
:form-params {:contactInfo {:alertsEmails []
:email ""
:name ""
:phone ""}
:homepageUrl ""
:issuerId ""
:name ""
:smartTapMerchantData {:authenticationKeys [{:id 0
:publicKeyPem ""}]
:smartTapMerchantId ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/issuer/:resourceId"),
Content = new StringContent("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/issuer/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
payload := strings.NewReader("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/issuer/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 309
{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/issuer/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.header("content-type", "application/json")
.body("{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
contactInfo: {
alertsEmails: [],
email: '',
name: '',
phone: ''
},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {
authenticationKeys: [
{
id: 0,
publicKeyPem: ''
}
],
smartTapMerchantId: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId',
headers: {'content-type': 'application/json'},
data: {
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/issuer/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"contactInfo":{"alertsEmails":[],"email":"","name":"","phone":""},"homepageUrl":"","issuerId":"","name":"","smartTapMerchantData":{"authenticationKeys":[{"id":0,"publicKeyPem":""}],"smartTapMerchantId":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "contactInfo": {\n "alertsEmails": [],\n "email": "",\n "name": "",\n "phone": ""\n },\n "homepageUrl": "",\n "issuerId": "",\n "name": "",\n "smartTapMerchantData": {\n "authenticationKeys": [\n {\n "id": 0,\n "publicKeyPem": ""\n }\n ],\n "smartTapMerchantId": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/issuer/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId',
headers: {'content-type': 'application/json'},
body: {
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
contactInfo: {
alertsEmails: [],
email: '',
name: '',
phone: ''
},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {
authenticationKeys: [
{
id: 0,
publicKeyPem: ''
}
],
smartTapMerchantId: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/issuer/:resourceId',
headers: {'content-type': 'application/json'},
data: {
contactInfo: {alertsEmails: [], email: '', name: '', phone: ''},
homepageUrl: '',
issuerId: '',
name: '',
smartTapMerchantData: {authenticationKeys: [{id: 0, publicKeyPem: ''}], smartTapMerchantId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/issuer/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"contactInfo":{"alertsEmails":[],"email":"","name":"","phone":""},"homepageUrl":"","issuerId":"","name":"","smartTapMerchantData":{"authenticationKeys":[{"id":0,"publicKeyPem":""}],"smartTapMerchantId":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"contactInfo": @{ @"alertsEmails": @[ ], @"email": @"", @"name": @"", @"phone": @"" },
@"homepageUrl": @"",
@"issuerId": @"",
@"name": @"",
@"smartTapMerchantData": @{ @"authenticationKeys": @[ @{ @"id": @0, @"publicKeyPem": @"" } ], @"smartTapMerchantId": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/issuer/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/issuer/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/issuer/:resourceId",
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([
'contactInfo' => [
'alertsEmails' => [
],
'email' => '',
'name' => '',
'phone' => ''
],
'homepageUrl' => '',
'issuerId' => '',
'name' => '',
'smartTapMerchantData' => [
'authenticationKeys' => [
[
'id' => 0,
'publicKeyPem' => ''
]
],
'smartTapMerchantId' => ''
]
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/issuer/:resourceId', [
'body' => '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'contactInfo' => [
'alertsEmails' => [
],
'email' => '',
'name' => '',
'phone' => ''
],
'homepageUrl' => '',
'issuerId' => '',
'name' => '',
'smartTapMerchantData' => [
'authenticationKeys' => [
[
'id' => 0,
'publicKeyPem' => ''
]
],
'smartTapMerchantId' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'contactInfo' => [
'alertsEmails' => [
],
'email' => '',
'name' => '',
'phone' => ''
],
'homepageUrl' => '',
'issuerId' => '',
'name' => '',
'smartTapMerchantData' => [
'authenticationKeys' => [
[
'id' => 0,
'publicKeyPem' => ''
]
],
'smartTapMerchantId' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/issuer/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/issuer/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/issuer/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/issuer/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
payload = {
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/issuer/:resourceId"
payload <- "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/issuer/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/issuer/:resourceId') do |req|
req.body = "{\n \"contactInfo\": {\n \"alertsEmails\": [],\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\"\n },\n \"homepageUrl\": \"\",\n \"issuerId\": \"\",\n \"name\": \"\",\n \"smartTapMerchantData\": {\n \"authenticationKeys\": [\n {\n \"id\": 0,\n \"publicKeyPem\": \"\"\n }\n ],\n \"smartTapMerchantId\": \"\"\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/issuer/:resourceId";
let payload = json!({
"contactInfo": json!({
"alertsEmails": (),
"email": "",
"name": "",
"phone": ""
}),
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": json!({
"authenticationKeys": (
json!({
"id": 0,
"publicKeyPem": ""
})
),
"smartTapMerchantId": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/issuer/:resourceId \
--header 'content-type: application/json' \
--data '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}'
echo '{
"contactInfo": {
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
},
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": {
"authenticationKeys": [
{
"id": 0,
"publicKeyPem": ""
}
],
"smartTapMerchantId": ""
}
}' | \
http PUT {{baseUrl}}/walletobjects/v1/issuer/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "contactInfo": {\n "alertsEmails": [],\n "email": "",\n "name": "",\n "phone": ""\n },\n "homepageUrl": "",\n "issuerId": "",\n "name": "",\n "smartTapMerchantData": {\n "authenticationKeys": [\n {\n "id": 0,\n "publicKeyPem": ""\n }\n ],\n "smartTapMerchantId": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/issuer/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"contactInfo": [
"alertsEmails": [],
"email": "",
"name": "",
"phone": ""
],
"homepageUrl": "",
"issuerId": "",
"name": "",
"smartTapMerchantData": [
"authenticationKeys": [
[
"id": 0,
"publicKeyPem": ""
]
],
"smartTapMerchantId": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/issuer/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.jwt.insert
{{baseUrl}}/walletobjects/v1/jwt
BODY json
{
"jwt": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/jwt");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"jwt\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/jwt" {:content-type :json
:form-params {:jwt ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/jwt"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"jwt\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/jwt"),
Content = new StringContent("{\n \"jwt\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/jwt");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"jwt\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/jwt"
payload := strings.NewReader("{\n \"jwt\": \"\"\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/jwt HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 15
{
"jwt": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/jwt")
.setHeader("content-type", "application/json")
.setBody("{\n \"jwt\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/jwt"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"jwt\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"jwt\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/jwt")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/jwt")
.header("content-type", "application/json")
.body("{\n \"jwt\": \"\"\n}")
.asString();
const data = JSON.stringify({
jwt: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/jwt');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/jwt',
headers: {'content-type': 'application/json'},
data: {jwt: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/jwt';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jwt":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/jwt',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "jwt": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"jwt\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/jwt")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/jwt',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({jwt: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/jwt',
headers: {'content-type': 'application/json'},
body: {jwt: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/jwt');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
jwt: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/jwt',
headers: {'content-type': 'application/json'},
data: {jwt: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/jwt';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jwt":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"jwt": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/jwt"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/jwt" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"jwt\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/jwt",
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([
'jwt' => ''
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/jwt', [
'body' => '{
"jwt": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/jwt');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'jwt' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'jwt' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/jwt');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/jwt' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jwt": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/jwt' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jwt": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"jwt\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/jwt", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/jwt"
payload = { "jwt": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/jwt"
payload <- "{\n \"jwt\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/jwt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"jwt\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/jwt') do |req|
req.body = "{\n \"jwt\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/jwt";
let payload = json!({"jwt": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/jwt \
--header 'content-type: application/json' \
--data '{
"jwt": ""
}'
echo '{
"jwt": ""
}' | \
http POST {{baseUrl}}/walletobjects/v1/jwt \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "jwt": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/jwt
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["jwt": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/jwt")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.loyaltyclass.addmessage
{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/loyaltyClass/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyClass/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/loyaltyClass/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/loyaltyClass/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.loyaltyclass.get
{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/loyaltyClass/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyClass/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/loyaltyClass/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/loyaltyClass/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId
http GET {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.loyaltyclass.insert
{{baseUrl}}/walletobjects/v1/loyaltyClass
BODY json
{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyClass");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/loyaltyClass" {:content-type :json
:form-params {:accountIdLabel ""
:accountNameLabel ""
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:discoverableProgram {:merchantSigninInfo {:signinWebsite {:description ""
:id ""
:kind ""
:localizedDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:uri ""}}
:merchantSignupInfo {:signupSharedDatas []
:signupWebsite {}}
:state ""}
:enableSmartTap false
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedAccountIdLabel {}
:localizedAccountNameLabel {}
:localizedIssuerName {}
:localizedProgramName {}
:localizedRewardsTier {}
:localizedRewardsTierLabel {}
:localizedSecondaryRewardsTier {}
:localizedSecondaryRewardsTierLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:programLogo {}
:programName ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rewardsTier ""
:rewardsTierLabel ""
:secondaryRewardsTier ""
:secondaryRewardsTierLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyClass"),
Content = new StringContent("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyClass");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyClass"
payload := strings.NewReader("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/loyaltyClass HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3770
{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/loyaltyClass")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyClass"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/loyaltyClass")
.header("content-type", "application/json")
.body("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/loyaltyClass');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass',
headers: {'content-type': 'application/json'},
data: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n }\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyClass',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass',
headers: {'content-type': 'application/json'},
body: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/loyaltyClass');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass',
headers: {'content-type': 'application/json'},
data: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIdLabel": @"",
@"accountNameLabel": @"",
@"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"discoverableProgram": @{ @"merchantSigninInfo": @{ @"signinWebsite": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"uri": @"" } }, @"merchantSignupInfo": @{ @"signupSharedDatas": @[ ], @"signupWebsite": @{ } }, @"state": @"" },
@"enableSmartTap": @NO,
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedAccountIdLabel": @{ },
@"localizedAccountNameLabel": @{ },
@"localizedIssuerName": @{ },
@"localizedProgramName": @{ },
@"localizedRewardsTier": @{ },
@"localizedRewardsTierLabel": @{ },
@"localizedSecondaryRewardsTier": @{ },
@"localizedSecondaryRewardsTierLabel": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"programLogo": @{ },
@"programName": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"rewardsTier": @"",
@"rewardsTierLabel": @"",
@"secondaryRewardsTier": @"",
@"secondaryRewardsTierLabel": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyClass" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyClass",
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([
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/loyaltyClass', [
'body' => '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/loyaltyClass", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass"
payload = {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": { "signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"uri": ""
} },
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": False,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyClass"
payload <- "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/loyaltyClass') do |req|
req.body = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyClass";
let payload = json!({
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"discoverableProgram": json!({
"merchantSigninInfo": json!({"signinWebsite": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"uri": ""
})}),
"merchantSignupInfo": json!({
"signupSharedDatas": (),
"signupWebsite": json!({})
}),
"state": ""
}),
"enableSmartTap": false,
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedAccountIdLabel": json!({}),
"localizedAccountNameLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedProgramName": json!({}),
"localizedRewardsTier": json!({}),
"localizedRewardsTierLabel": json!({}),
"localizedSecondaryRewardsTier": json!({}),
"localizedSecondaryRewardsTierLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": json!({}),
"programName": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/loyaltyClass \
--header 'content-type: application/json' \
--data '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http POST {{baseUrl}}/walletobjects/v1/loyaltyClass \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n }\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyClass
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"discoverableProgram": [
"merchantSigninInfo": ["signinWebsite": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"uri": ""
]],
"merchantSignupInfo": [
"signupSharedDatas": [],
"signupWebsite": []
],
"state": ""
],
"enableSmartTap": false,
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedAccountIdLabel": [],
"localizedAccountNameLabel": [],
"localizedIssuerName": [],
"localizedProgramName": [],
"localizedRewardsTier": [],
"localizedRewardsTierLabel": [],
"localizedSecondaryRewardsTier": [],
"localizedSecondaryRewardsTierLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": [],
"programName": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.loyaltyclass.list
{{baseUrl}}/walletobjects/v1/loyaltyClass
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyClass");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/loyaltyClass")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyClass"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyClass");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyClass"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/loyaltyClass HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/loyaltyClass")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyClass"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/loyaltyClass")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/loyaltyClass');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyClass',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/loyaltyClass');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyClass" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyClass",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/loyaltyClass');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/loyaltyClass")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyClass"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/loyaltyClass') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyClass";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/loyaltyClass
http GET {{baseUrl}}/walletobjects/v1/loyaltyClass
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyClass
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.loyaltyclass.patch
{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId" {:content-type :json
:form-params {:accountIdLabel ""
:accountNameLabel ""
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:discoverableProgram {:merchantSigninInfo {:signinWebsite {:description ""
:id ""
:kind ""
:localizedDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:uri ""}}
:merchantSignupInfo {:signupSharedDatas []
:signupWebsite {}}
:state ""}
:enableSmartTap false
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedAccountIdLabel {}
:localizedAccountNameLabel {}
:localizedIssuerName {}
:localizedProgramName {}
:localizedRewardsTier {}
:localizedRewardsTierLabel {}
:localizedSecondaryRewardsTier {}
:localizedSecondaryRewardsTierLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:programLogo {}
:programName ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rewardsTier ""
:rewardsTierLabel ""
:secondaryRewardsTier ""
:secondaryRewardsTierLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"),
Content = new StringContent("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
payload := strings.NewReader("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/loyaltyClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3770
{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n }\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIdLabel": @"",
@"accountNameLabel": @"",
@"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"discoverableProgram": @{ @"merchantSigninInfo": @{ @"signinWebsite": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"uri": @"" } }, @"merchantSignupInfo": @{ @"signupSharedDatas": @[ ], @"signupWebsite": @{ } }, @"state": @"" },
@"enableSmartTap": @NO,
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedAccountIdLabel": @{ },
@"localizedAccountNameLabel": @{ },
@"localizedIssuerName": @{ },
@"localizedProgramName": @{ },
@"localizedRewardsTier": @{ },
@"localizedRewardsTierLabel": @{ },
@"localizedSecondaryRewardsTier": @{ },
@"localizedSecondaryRewardsTierLabel": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"programLogo": @{ },
@"programName": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"rewardsTier": @"",
@"rewardsTierLabel": @"",
@"secondaryRewardsTier": @"",
@"secondaryRewardsTierLabel": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId', [
'body' => '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/loyaltyClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
payload = {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": { "signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"uri": ""
} },
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": False,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
payload <- "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/loyaltyClass/:resourceId') do |req|
req.body = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId";
let payload = json!({
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"discoverableProgram": json!({
"merchantSigninInfo": json!({"signinWebsite": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"uri": ""
})}),
"merchantSignupInfo": json!({
"signupSharedDatas": (),
"signupWebsite": json!({})
}),
"state": ""
}),
"enableSmartTap": false,
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedAccountIdLabel": json!({}),
"localizedAccountNameLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedProgramName": json!({}),
"localizedRewardsTier": json!({}),
"localizedRewardsTierLabel": json!({}),
"localizedSecondaryRewardsTier": json!({}),
"localizedSecondaryRewardsTierLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": json!({}),
"programName": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n }\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"discoverableProgram": [
"merchantSigninInfo": ["signinWebsite": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"uri": ""
]],
"merchantSignupInfo": [
"signupSharedDatas": [],
"signupWebsite": []
],
"state": ""
],
"enableSmartTap": false,
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedAccountIdLabel": [],
"localizedAccountNameLabel": [],
"localizedIssuerName": [],
"localizedProgramName": [],
"localizedRewardsTier": [],
"localizedRewardsTierLabel": [],
"localizedSecondaryRewardsTier": [],
"localizedSecondaryRewardsTierLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": [],
"programName": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.loyaltyclass.update
{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId" {:content-type :json
:form-params {:accountIdLabel ""
:accountNameLabel ""
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:discoverableProgram {:merchantSigninInfo {:signinWebsite {:description ""
:id ""
:kind ""
:localizedDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:uri ""}}
:merchantSignupInfo {:signupSharedDatas []
:signupWebsite {}}
:state ""}
:enableSmartTap false
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedAccountIdLabel {}
:localizedAccountNameLabel {}
:localizedIssuerName {}
:localizedProgramName {}
:localizedRewardsTier {}
:localizedRewardsTierLabel {}
:localizedSecondaryRewardsTier {}
:localizedSecondaryRewardsTierLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:programLogo {}
:programName ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rewardsTier ""
:rewardsTierLabel ""
:secondaryRewardsTier ""
:secondaryRewardsTierLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"),
Content = new StringContent("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
payload := strings.NewReader("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/loyaltyClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3770
{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n }\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
}
},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIdLabel": @"",
@"accountNameLabel": @"",
@"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"discoverableProgram": @{ @"merchantSigninInfo": @{ @"signinWebsite": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"uri": @"" } }, @"merchantSignupInfo": @{ @"signupSharedDatas": @[ ], @"signupWebsite": @{ } }, @"state": @"" },
@"enableSmartTap": @NO,
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedAccountIdLabel": @{ },
@"localizedAccountNameLabel": @{ },
@"localizedIssuerName": @{ },
@"localizedProgramName": @{ },
@"localizedRewardsTier": @{ },
@"localizedRewardsTierLabel": @{ },
@"localizedSecondaryRewardsTier": @{ },
@"localizedSecondaryRewardsTierLabel": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"programLogo": @{ },
@"programName": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"rewardsTier": @"",
@"rewardsTierLabel": @"",
@"secondaryRewardsTier": @"",
@"secondaryRewardsTierLabel": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId",
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([
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId', [
'body' => '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/loyaltyClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
payload = {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": { "signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"uri": ""
} },
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": False,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId"
payload <- "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/loyaltyClass/:resourceId') do |req|
req.body = "{\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n }\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId";
let payload = json!({
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"discoverableProgram": json!({
"merchantSigninInfo": json!({"signinWebsite": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"uri": ""
})}),
"merchantSignupInfo": json!({
"signupSharedDatas": (),
"signupWebsite": json!({})
}),
"state": ""
}),
"enableSmartTap": false,
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedAccountIdLabel": json!({}),
"localizedAccountNameLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedProgramName": json!({}),
"localizedRewardsTier": json!({}),
"localizedRewardsTierLabel": json!({}),
"localizedSecondaryRewardsTier": json!({}),
"localizedSecondaryRewardsTierLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": json!({}),
"programName": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PUT {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n }\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"discoverableProgram": [
"merchantSigninInfo": ["signinWebsite": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"uri": ""
]],
"merchantSignupInfo": [
"signupSharedDatas": [],
"signupWebsite": []
],
"state": ""
],
"enableSmartTap": false,
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedAccountIdLabel": [],
"localizedAccountNameLabel": [],
"localizedIssuerName": [],
"localizedProgramName": [],
"localizedRewardsTier": [],
"localizedRewardsTierLabel": [],
"localizedSecondaryRewardsTier": [],
"localizedSecondaryRewardsTierLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": [],
"programName": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.loyaltyobject.addmessage
{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/loyaltyObject/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyObject/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/loyaltyObject/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/loyaltyObject/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.loyaltyobject.get
{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/loyaltyObject/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyObject/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/loyaltyObject/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/loyaltyObject/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId
http GET {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.loyaltyobject.insert
{{baseUrl}}/walletobjects/v1/loyaltyObject
BODY json
{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyObject");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/loyaltyObject" {:content-type :json
:form-params {:accountId ""
:accountName ""
:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:accountIdLabel ""
:accountNameLabel ""
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:discoverableProgram {:merchantSigninInfo {:signinWebsite {}}
:merchantSignupInfo {:signupSharedDatas []
:signupWebsite {}}
:state ""}
:enableSmartTap false
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedAccountIdLabel {}
:localizedAccountNameLabel {}
:localizedIssuerName {}
:localizedProgramName {}
:localizedRewardsTier {}
:localizedRewardsTierLabel {}
:localizedSecondaryRewardsTier {}
:localizedSecondaryRewardsTierLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:programLogo {}
:programName ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rewardsTier ""
:rewardsTierLabel ""
:secondaryRewardsTier ""
:secondaryRewardsTierLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linkedOfferIds []
:linksModuleData {}
:locations [{}]
:loyaltyPoints {:balance {:double ""
:int 0
:money {:currencyCode ""
:kind ""
:micros ""}
:string ""}
:label ""
:localizedLabel {}}
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:secondaryLoyaltyPoints {}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyObject"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyObject");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyObject"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/loyaltyObject HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5747
{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/loyaltyObject")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyObject"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/loyaltyObject")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {
currencyCode: '',
kind: '',
micros: ''
},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/loyaltyObject');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","accountName":"","appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"loyaltyPoints":{"balance":{"double":"","int":0,"money":{"currencyCode":"","kind":"","micros":""},"string":""},"label":"","localizedLabel":{}},"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"secondaryLoyaltyPoints":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "accountName": "",\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {}\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "loyaltyPoints": {\n "balance": {\n "double": "",\n "int": 0,\n "money": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "string": ""\n },\n "label": "",\n "localizedLabel": {}\n },\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "secondaryLoyaltyPoints": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyObject',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/loyaltyObject');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {
currencyCode: '',
kind: '',
micros: ''
},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","accountName":"","appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"loyaltyPoints":{"balance":{"double":"","int":0,"money":{"currencyCode":"","kind":"","micros":""},"string":""},"label":"","localizedLabel":{}},"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"secondaryLoyaltyPoints":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"accountName": @"",
@"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"accountIdLabel": @"", @"accountNameLabel": @"", @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"discoverableProgram": @{ @"merchantSigninInfo": @{ @"signinWebsite": @{ } }, @"merchantSignupInfo": @{ @"signupSharedDatas": @[ ], @"signupWebsite": @{ } }, @"state": @"" }, @"enableSmartTap": @NO, @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedAccountIdLabel": @{ }, @"localizedAccountNameLabel": @{ }, @"localizedIssuerName": @{ }, @"localizedProgramName": @{ }, @"localizedRewardsTier": @{ }, @"localizedRewardsTierLabel": @{ }, @"localizedSecondaryRewardsTier": @{ }, @"localizedSecondaryRewardsTierLabel": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"programLogo": @{ }, @"programName": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"rewardsTier": @"", @"rewardsTierLabel": @"", @"secondaryRewardsTier": @"", @"secondaryRewardsTierLabel": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linkedOfferIds": @[ ],
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"loyaltyPoints": @{ @"balance": @{ @"double": @"", @"int": @0, @"money": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" }, @"string": @"" }, @"label": @"", @"localizedLabel": @{ } },
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"secondaryLoyaltyPoints": @{ },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyObject" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyObject",
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([
'accountId' => '',
'accountName' => '',
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'loyaltyPoints' => [
'balance' => [
'double' => '',
'int' => 0,
'money' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'string' => ''
],
'label' => '',
'localizedLabel' => [
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'secondaryLoyaltyPoints' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/loyaltyObject', [
'body' => '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'accountName' => '',
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'loyaltyPoints' => [
'balance' => [
'double' => '',
'int' => 0,
'money' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'string' => ''
],
'label' => '',
'localizedLabel' => [
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'secondaryLoyaltyPoints' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'accountName' => '',
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'loyaltyPoints' => [
'balance' => [
'double' => '',
'int' => 0,
'money' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'string' => ''
],
'label' => '',
'localizedLabel' => [
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'secondaryLoyaltyPoints' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/loyaltyObject", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject"
payload = {
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": { "signinWebsite": {} },
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": False,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [{}],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyObject"
payload <- "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/loyaltyObject') do |req|
req.body = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyObject";
let payload = json!({
"accountId": "",
"accountName": "",
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"discoverableProgram": json!({
"merchantSigninInfo": json!({"signinWebsite": json!({})}),
"merchantSignupInfo": json!({
"signupSharedDatas": (),
"signupWebsite": json!({})
}),
"state": ""
}),
"enableSmartTap": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedAccountIdLabel": json!({}),
"localizedAccountNameLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedProgramName": json!({}),
"localizedRewardsTier": json!({}),
"localizedRewardsTierLabel": json!({}),
"localizedSecondaryRewardsTier": json!({}),
"localizedSecondaryRewardsTierLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": json!({}),
"programName": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linkedOfferIds": (),
"linksModuleData": json!({}),
"locations": (json!({})),
"loyaltyPoints": json!({
"balance": json!({
"double": "",
"int": 0,
"money": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"string": ""
}),
"label": "",
"localizedLabel": json!({})
}),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"secondaryLoyaltyPoints": json!({}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/loyaltyObject \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http POST {{baseUrl}}/walletobjects/v1/loyaltyObject \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "accountName": "",\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {}\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "loyaltyPoints": {\n "balance": {\n "double": "",\n "int": 0,\n "money": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "string": ""\n },\n "label": "",\n "localizedLabel": {}\n },\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "secondaryLoyaltyPoints": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyObject
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"accountName": "",
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"discoverableProgram": [
"merchantSigninInfo": ["signinWebsite": []],
"merchantSignupInfo": [
"signupSharedDatas": [],
"signupWebsite": []
],
"state": ""
],
"enableSmartTap": false,
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedAccountIdLabel": [],
"localizedAccountNameLabel": [],
"localizedIssuerName": [],
"localizedProgramName": [],
"localizedRewardsTier": [],
"localizedRewardsTierLabel": [],
"localizedSecondaryRewardsTier": [],
"localizedSecondaryRewardsTierLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": [],
"programName": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linkedOfferIds": [],
"linksModuleData": [],
"locations": [[]],
"loyaltyPoints": [
"balance": [
"double": "",
"int": 0,
"money": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"string": ""
],
"label": "",
"localizedLabel": []
],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"secondaryLoyaltyPoints": [],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.loyaltyobject.list
{{baseUrl}}/walletobjects/v1/loyaltyObject
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyObject");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/loyaltyObject")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyObject"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyObject");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyObject"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/loyaltyObject HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/loyaltyObject")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyObject"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/loyaltyObject")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/loyaltyObject');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyObject',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/loyaltyObject');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyObject" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyObject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/loyaltyObject');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/loyaltyObject")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyObject"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/loyaltyObject') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyObject";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/loyaltyObject
http GET {{baseUrl}}/walletobjects/v1/loyaltyObject
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyObject
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.loyaltyobject.modifylinkedofferobjects
{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects
QUERY PARAMS
resourceId
BODY json
{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects" {:content-type :json
:form-params {:linkedOfferObjectIds {:addLinkedOfferObjectIds []
:removeLinkedOfferObjectIds []}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects"),
Content = new StringContent("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects"
payload := strings.NewReader("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 107
{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects")
.setHeader("content-type", "application/json")
.setBody("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects")
.header("content-type", "application/json")
.body("{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}")
.asString();
const data = JSON.stringify({
linkedOfferObjectIds: {
addLinkedOfferObjectIds: [],
removeLinkedOfferObjectIds: []
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects',
headers: {'content-type': 'application/json'},
data: {
linkedOfferObjectIds: {addLinkedOfferObjectIds: [], removeLinkedOfferObjectIds: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"linkedOfferObjectIds":{"addLinkedOfferObjectIds":[],"removeLinkedOfferObjectIds":[]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "linkedOfferObjectIds": {\n "addLinkedOfferObjectIds": [],\n "removeLinkedOfferObjectIds": []\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
linkedOfferObjectIds: {addLinkedOfferObjectIds: [], removeLinkedOfferObjectIds: []}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects',
headers: {'content-type': 'application/json'},
body: {
linkedOfferObjectIds: {addLinkedOfferObjectIds: [], removeLinkedOfferObjectIds: []}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
linkedOfferObjectIds: {
addLinkedOfferObjectIds: [],
removeLinkedOfferObjectIds: []
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects',
headers: {'content-type': 'application/json'},
data: {
linkedOfferObjectIds: {addLinkedOfferObjectIds: [], removeLinkedOfferObjectIds: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"linkedOfferObjectIds":{"addLinkedOfferObjectIds":[],"removeLinkedOfferObjectIds":[]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"linkedOfferObjectIds": @{ @"addLinkedOfferObjectIds": @[ ], @"removeLinkedOfferObjectIds": @[ ] } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects",
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([
'linkedOfferObjectIds' => [
'addLinkedOfferObjectIds' => [
],
'removeLinkedOfferObjectIds' => [
]
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects', [
'body' => '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'linkedOfferObjectIds' => [
'addLinkedOfferObjectIds' => [
],
'removeLinkedOfferObjectIds' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'linkedOfferObjectIds' => [
'addLinkedOfferObjectIds' => [
],
'removeLinkedOfferObjectIds' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects"
payload = { "linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects"
payload <- "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects') do |req|
req.body = "{\n \"linkedOfferObjectIds\": {\n \"addLinkedOfferObjectIds\": [],\n \"removeLinkedOfferObjectIds\": []\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects";
let payload = json!({"linkedOfferObjectIds": json!({
"addLinkedOfferObjectIds": (),
"removeLinkedOfferObjectIds": ()
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects \
--header 'content-type: application/json' \
--data '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}'
echo '{
"linkedOfferObjectIds": {
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "linkedOfferObjectIds": {\n "addLinkedOfferObjectIds": [],\n "removeLinkedOfferObjectIds": []\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["linkedOfferObjectIds": [
"addLinkedOfferObjectIds": [],
"removeLinkedOfferObjectIds": []
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId/modifyLinkedOfferObjects")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.loyaltyobject.patch
{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId" {:content-type :json
:form-params {:accountId ""
:accountName ""
:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:accountIdLabel ""
:accountNameLabel ""
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:discoverableProgram {:merchantSigninInfo {:signinWebsite {}}
:merchantSignupInfo {:signupSharedDatas []
:signupWebsite {}}
:state ""}
:enableSmartTap false
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedAccountIdLabel {}
:localizedAccountNameLabel {}
:localizedIssuerName {}
:localizedProgramName {}
:localizedRewardsTier {}
:localizedRewardsTierLabel {}
:localizedSecondaryRewardsTier {}
:localizedSecondaryRewardsTierLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:programLogo {}
:programName ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rewardsTier ""
:rewardsTierLabel ""
:secondaryRewardsTier ""
:secondaryRewardsTierLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linkedOfferIds []
:linksModuleData {}
:locations [{}]
:loyaltyPoints {:balance {:double ""
:int 0
:money {:currencyCode ""
:kind ""
:micros ""}
:string ""}
:label ""
:localizedLabel {}}
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:secondaryLoyaltyPoints {}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/loyaltyObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5747
{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {
currencyCode: '',
kind: '',
micros: ''
},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","accountName":"","appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"loyaltyPoints":{"balance":{"double":"","int":0,"money":{"currencyCode":"","kind":"","micros":""},"string":""},"label":"","localizedLabel":{}},"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"secondaryLoyaltyPoints":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "accountName": "",\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {}\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "loyaltyPoints": {\n "balance": {\n "double": "",\n "int": 0,\n "money": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "string": ""\n },\n "label": "",\n "localizedLabel": {}\n },\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "secondaryLoyaltyPoints": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {
currencyCode: '',
kind: '',
micros: ''
},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","accountName":"","appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"loyaltyPoints":{"balance":{"double":"","int":0,"money":{"currencyCode":"","kind":"","micros":""},"string":""},"label":"","localizedLabel":{}},"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"secondaryLoyaltyPoints":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"accountName": @"",
@"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"accountIdLabel": @"", @"accountNameLabel": @"", @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"discoverableProgram": @{ @"merchantSigninInfo": @{ @"signinWebsite": @{ } }, @"merchantSignupInfo": @{ @"signupSharedDatas": @[ ], @"signupWebsite": @{ } }, @"state": @"" }, @"enableSmartTap": @NO, @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedAccountIdLabel": @{ }, @"localizedAccountNameLabel": @{ }, @"localizedIssuerName": @{ }, @"localizedProgramName": @{ }, @"localizedRewardsTier": @{ }, @"localizedRewardsTierLabel": @{ }, @"localizedSecondaryRewardsTier": @{ }, @"localizedSecondaryRewardsTierLabel": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"programLogo": @{ }, @"programName": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"rewardsTier": @"", @"rewardsTierLabel": @"", @"secondaryRewardsTier": @"", @"secondaryRewardsTierLabel": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linkedOfferIds": @[ ],
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"loyaltyPoints": @{ @"balance": @{ @"double": @"", @"int": @0, @"money": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" }, @"string": @"" }, @"label": @"", @"localizedLabel": @{ } },
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"secondaryLoyaltyPoints": @{ },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'accountName' => '',
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'loyaltyPoints' => [
'balance' => [
'double' => '',
'int' => 0,
'money' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'string' => ''
],
'label' => '',
'localizedLabel' => [
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'secondaryLoyaltyPoints' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId', [
'body' => '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'accountName' => '',
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'loyaltyPoints' => [
'balance' => [
'double' => '',
'int' => 0,
'money' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'string' => ''
],
'label' => '',
'localizedLabel' => [
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'secondaryLoyaltyPoints' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'accountName' => '',
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'loyaltyPoints' => [
'balance' => [
'double' => '',
'int' => 0,
'money' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'string' => ''
],
'label' => '',
'localizedLabel' => [
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'secondaryLoyaltyPoints' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/loyaltyObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
payload = {
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": { "signinWebsite": {} },
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": False,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [{}],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
payload <- "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/loyaltyObject/:resourceId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId";
let payload = json!({
"accountId": "",
"accountName": "",
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"discoverableProgram": json!({
"merchantSigninInfo": json!({"signinWebsite": json!({})}),
"merchantSignupInfo": json!({
"signupSharedDatas": (),
"signupWebsite": json!({})
}),
"state": ""
}),
"enableSmartTap": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedAccountIdLabel": json!({}),
"localizedAccountNameLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedProgramName": json!({}),
"localizedRewardsTier": json!({}),
"localizedRewardsTierLabel": json!({}),
"localizedSecondaryRewardsTier": json!({}),
"localizedSecondaryRewardsTierLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": json!({}),
"programName": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linkedOfferIds": (),
"linksModuleData": json!({}),
"locations": (json!({})),
"loyaltyPoints": json!({
"balance": json!({
"double": "",
"int": 0,
"money": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"string": ""
}),
"label": "",
"localizedLabel": json!({})
}),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"secondaryLoyaltyPoints": json!({}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "accountName": "",\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {}\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "loyaltyPoints": {\n "balance": {\n "double": "",\n "int": 0,\n "money": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "string": ""\n },\n "label": "",\n "localizedLabel": {}\n },\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "secondaryLoyaltyPoints": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"accountName": "",
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"discoverableProgram": [
"merchantSigninInfo": ["signinWebsite": []],
"merchantSignupInfo": [
"signupSharedDatas": [],
"signupWebsite": []
],
"state": ""
],
"enableSmartTap": false,
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedAccountIdLabel": [],
"localizedAccountNameLabel": [],
"localizedIssuerName": [],
"localizedProgramName": [],
"localizedRewardsTier": [],
"localizedRewardsTierLabel": [],
"localizedSecondaryRewardsTier": [],
"localizedSecondaryRewardsTierLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": [],
"programName": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linkedOfferIds": [],
"linksModuleData": [],
"locations": [[]],
"loyaltyPoints": [
"balance": [
"double": "",
"int": 0,
"money": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"string": ""
],
"label": "",
"localizedLabel": []
],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"secondaryLoyaltyPoints": [],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.loyaltyobject.update
{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId" {:content-type :json
:form-params {:accountId ""
:accountName ""
:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:accountIdLabel ""
:accountNameLabel ""
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:discoverableProgram {:merchantSigninInfo {:signinWebsite {}}
:merchantSignupInfo {:signupSharedDatas []
:signupWebsite {}}
:state ""}
:enableSmartTap false
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedAccountIdLabel {}
:localizedAccountNameLabel {}
:localizedIssuerName {}
:localizedProgramName {}
:localizedRewardsTier {}
:localizedRewardsTierLabel {}
:localizedSecondaryRewardsTier {}
:localizedSecondaryRewardsTierLabel {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:programLogo {}
:programName ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:rewardsTier ""
:rewardsTierLabel ""
:secondaryRewardsTier ""
:secondaryRewardsTierLabel ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linkedOfferIds []
:linksModuleData {}
:locations [{}]
:loyaltyPoints {:balance {:double ""
:int 0
:money {:currencyCode ""
:kind ""
:micros ""}
:string ""}
:label ""
:localizedLabel {}}
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:secondaryLoyaltyPoints {}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/loyaltyObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5747
{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {
currencyCode: '',
kind: '',
micros: ''
},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","accountName":"","appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"loyaltyPoints":{"balance":{"double":"","int":0,"money":{"currencyCode":"","kind":"","micros":""},"string":""},"label":"","localizedLabel":{}},"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"secondaryLoyaltyPoints":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "accountName": "",\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {}\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "loyaltyPoints": {\n "balance": {\n "double": "",\n "int": 0,\n "money": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "string": ""\n },\n "label": "",\n "localizedLabel": {}\n },\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "secondaryLoyaltyPoints": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/loyaltyObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {
signinWebsite: {}
},
merchantSignupInfo: {
signupSharedDatas: [],
signupWebsite: {}
},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [
{}
],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {
currencyCode: '',
kind: '',
micros: ''
},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
accountName: '',
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
accountIdLabel: '',
accountNameLabel: '',
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
discoverableProgram: {
merchantSigninInfo: {signinWebsite: {}},
merchantSignupInfo: {signupSharedDatas: [], signupWebsite: {}},
state: ''
},
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedAccountIdLabel: {},
localizedAccountNameLabel: {},
localizedIssuerName: {},
localizedProgramName: {},
localizedRewardsTier: {},
localizedRewardsTierLabel: {},
localizedSecondaryRewardsTier: {},
localizedSecondaryRewardsTierLabel: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
programLogo: {},
programName: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
rewardsTier: '',
rewardsTierLabel: '',
secondaryRewardsTier: '',
secondaryRewardsTierLabel: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linkedOfferIds: [],
linksModuleData: {},
locations: [{}],
loyaltyPoints: {
balance: {
double: '',
int: 0,
money: {currencyCode: '', kind: '', micros: ''},
string: ''
},
label: '',
localizedLabel: {}
},
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
secondaryLoyaltyPoints: {},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","accountName":"","appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"accountIdLabel":"","accountNameLabel":"","allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","discoverableProgram":{"merchantSigninInfo":{"signinWebsite":{}},"merchantSignupInfo":{"signupSharedDatas":[],"signupWebsite":{}},"state":""},"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedAccountIdLabel":{},"localizedAccountNameLabel":{},"localizedIssuerName":{},"localizedProgramName":{},"localizedRewardsTier":{},"localizedRewardsTierLabel":{},"localizedSecondaryRewardsTier":{},"localizedSecondaryRewardsTierLabel":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","programLogo":{},"programName":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","rewardsTier":"","rewardsTierLabel":"","secondaryRewardsTier":"","secondaryRewardsTierLabel":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linkedOfferIds":[],"linksModuleData":{},"locations":[{}],"loyaltyPoints":{"balance":{"double":"","int":0,"money":{"currencyCode":"","kind":"","micros":""},"string":""},"label":"","localizedLabel":{}},"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"secondaryLoyaltyPoints":{},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"accountName": @"",
@"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"accountIdLabel": @"", @"accountNameLabel": @"", @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"discoverableProgram": @{ @"merchantSigninInfo": @{ @"signinWebsite": @{ } }, @"merchantSignupInfo": @{ @"signupSharedDatas": @[ ], @"signupWebsite": @{ } }, @"state": @"" }, @"enableSmartTap": @NO, @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedAccountIdLabel": @{ }, @"localizedAccountNameLabel": @{ }, @"localizedIssuerName": @{ }, @"localizedProgramName": @{ }, @"localizedRewardsTier": @{ }, @"localizedRewardsTierLabel": @{ }, @"localizedSecondaryRewardsTier": @{ }, @"localizedSecondaryRewardsTierLabel": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"programLogo": @{ }, @"programName": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"rewardsTier": @"", @"rewardsTierLabel": @"", @"secondaryRewardsTier": @"", @"secondaryRewardsTierLabel": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linkedOfferIds": @[ ],
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"loyaltyPoints": @{ @"balance": @{ @"double": @"", @"int": @0, @"money": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" }, @"string": @"" }, @"label": @"", @"localizedLabel": @{ } },
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"secondaryLoyaltyPoints": @{ },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId",
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([
'accountId' => '',
'accountName' => '',
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'loyaltyPoints' => [
'balance' => [
'double' => '',
'int' => 0,
'money' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'string' => ''
],
'label' => '',
'localizedLabel' => [
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'secondaryLoyaltyPoints' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId', [
'body' => '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'accountName' => '',
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'loyaltyPoints' => [
'balance' => [
'double' => '',
'int' => 0,
'money' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'string' => ''
],
'label' => '',
'localizedLabel' => [
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'secondaryLoyaltyPoints' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'accountName' => '',
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'accountIdLabel' => '',
'accountNameLabel' => '',
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'discoverableProgram' => [
'merchantSigninInfo' => [
'signinWebsite' => [
]
],
'merchantSignupInfo' => [
'signupSharedDatas' => [
],
'signupWebsite' => [
]
],
'state' => ''
],
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedAccountIdLabel' => [
],
'localizedAccountNameLabel' => [
],
'localizedIssuerName' => [
],
'localizedProgramName' => [
],
'localizedRewardsTier' => [
],
'localizedRewardsTierLabel' => [
],
'localizedSecondaryRewardsTier' => [
],
'localizedSecondaryRewardsTierLabel' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'programLogo' => [
],
'programName' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'rewardsTier' => '',
'rewardsTierLabel' => '',
'secondaryRewardsTier' => '',
'secondaryRewardsTierLabel' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linkedOfferIds' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'loyaltyPoints' => [
'balance' => [
'double' => '',
'int' => 0,
'money' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'string' => ''
],
'label' => '',
'localizedLabel' => [
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'secondaryLoyaltyPoints' => [
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/loyaltyObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
payload = {
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": { "signinWebsite": {} },
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": False,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [{}],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId"
payload <- "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/loyaltyObject/:resourceId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"accountName\": \"\",\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"accountIdLabel\": \"\",\n \"accountNameLabel\": \"\",\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"discoverableProgram\": {\n \"merchantSigninInfo\": {\n \"signinWebsite\": {}\n },\n \"merchantSignupInfo\": {\n \"signupSharedDatas\": [],\n \"signupWebsite\": {}\n },\n \"state\": \"\"\n },\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedAccountIdLabel\": {},\n \"localizedAccountNameLabel\": {},\n \"localizedIssuerName\": {},\n \"localizedProgramName\": {},\n \"localizedRewardsTier\": {},\n \"localizedRewardsTierLabel\": {},\n \"localizedSecondaryRewardsTier\": {},\n \"localizedSecondaryRewardsTierLabel\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"programLogo\": {},\n \"programName\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"rewardsTier\": \"\",\n \"rewardsTierLabel\": \"\",\n \"secondaryRewardsTier\": \"\",\n \"secondaryRewardsTierLabel\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linkedOfferIds\": [],\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"loyaltyPoints\": {\n \"balance\": {\n \"double\": \"\",\n \"int\": 0,\n \"money\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"string\": \"\"\n },\n \"label\": \"\",\n \"localizedLabel\": {}\n },\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"secondaryLoyaltyPoints\": {},\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId";
let payload = json!({
"accountId": "",
"accountName": "",
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"discoverableProgram": json!({
"merchantSigninInfo": json!({"signinWebsite": json!({})}),
"merchantSignupInfo": json!({
"signupSharedDatas": (),
"signupWebsite": json!({})
}),
"state": ""
}),
"enableSmartTap": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedAccountIdLabel": json!({}),
"localizedAccountNameLabel": json!({}),
"localizedIssuerName": json!({}),
"localizedProgramName": json!({}),
"localizedRewardsTier": json!({}),
"localizedRewardsTierLabel": json!({}),
"localizedSecondaryRewardsTier": json!({}),
"localizedSecondaryRewardsTierLabel": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": json!({}),
"programName": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linkedOfferIds": (),
"linksModuleData": json!({}),
"locations": (json!({})),
"loyaltyPoints": json!({
"balance": json!({
"double": "",
"int": 0,
"money": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"string": ""
}),
"label": "",
"localizedLabel": json!({})
}),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"secondaryLoyaltyPoints": json!({}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"accountId": "",
"accountName": "",
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"discoverableProgram": {
"merchantSigninInfo": {
"signinWebsite": {}
},
"merchantSignupInfo": {
"signupSharedDatas": [],
"signupWebsite": {}
},
"state": ""
},
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedAccountIdLabel": {},
"localizedAccountNameLabel": {},
"localizedIssuerName": {},
"localizedProgramName": {},
"localizedRewardsTier": {},
"localizedRewardsTierLabel": {},
"localizedSecondaryRewardsTier": {},
"localizedSecondaryRewardsTierLabel": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": {},
"programName": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linkedOfferIds": [],
"linksModuleData": {},
"locations": [
{}
],
"loyaltyPoints": {
"balance": {
"double": "",
"int": 0,
"money": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"string": ""
},
"label": "",
"localizedLabel": {}
},
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"secondaryLoyaltyPoints": {},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http PUT {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "accountName": "",\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "accountIdLabel": "",\n "accountNameLabel": "",\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "discoverableProgram": {\n "merchantSigninInfo": {\n "signinWebsite": {}\n },\n "merchantSignupInfo": {\n "signupSharedDatas": [],\n "signupWebsite": {}\n },\n "state": ""\n },\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedAccountIdLabel": {},\n "localizedAccountNameLabel": {},\n "localizedIssuerName": {},\n "localizedProgramName": {},\n "localizedRewardsTier": {},\n "localizedRewardsTierLabel": {},\n "localizedSecondaryRewardsTier": {},\n "localizedSecondaryRewardsTierLabel": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "programLogo": {},\n "programName": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "rewardsTier": "",\n "rewardsTierLabel": "",\n "secondaryRewardsTier": "",\n "secondaryRewardsTierLabel": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linkedOfferIds": [],\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "loyaltyPoints": {\n "balance": {\n "double": "",\n "int": 0,\n "money": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "string": ""\n },\n "label": "",\n "localizedLabel": {}\n },\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "secondaryLoyaltyPoints": {},\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"accountName": "",
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"accountIdLabel": "",
"accountNameLabel": "",
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"discoverableProgram": [
"merchantSigninInfo": ["signinWebsite": []],
"merchantSignupInfo": [
"signupSharedDatas": [],
"signupWebsite": []
],
"state": ""
],
"enableSmartTap": false,
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedAccountIdLabel": [],
"localizedAccountNameLabel": [],
"localizedIssuerName": [],
"localizedProgramName": [],
"localizedRewardsTier": [],
"localizedRewardsTierLabel": [],
"localizedSecondaryRewardsTier": [],
"localizedSecondaryRewardsTierLabel": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"programLogo": [],
"programName": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"rewardsTier": "",
"rewardsTierLabel": "",
"secondaryRewardsTier": "",
"secondaryRewardsTierLabel": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linkedOfferIds": [],
"linksModuleData": [],
"locations": [[]],
"loyaltyPoints": [
"balance": [
"double": "",
"int": 0,
"money": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"string": ""
],
"label": "",
"localizedLabel": []
],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"secondaryLoyaltyPoints": [],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/loyaltyObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.media.upload
{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage
QUERY PARAMS
issuerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage
http POST {{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/privateContent/:issuerId/uploadPrivateImage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.offerclass.addmessage
{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/offerClass/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerClass/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/offerClass/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/offerClass/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.offerclass.get
{{baseUrl}}/walletobjects/v1/offerClass/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/offerClass/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerClass/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/offerClass/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/offerClass/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/offerClass/:resourceId
http GET {{baseUrl}}/walletobjects/v1/offerClass/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerClass/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.offerclass.insert
{{baseUrl}}/walletobjects/v1/offerClass
BODY json
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerClass");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/offerClass" {:content-type :json
:form-params {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:details ""
:enableSmartTap false
:finePrint ""
:helpUri {:description ""
:id ""
:kind ""
:localizedDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:uri ""}
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedDetails {}
:localizedFinePrint {}
:localizedIssuerName {}
:localizedProvider {}
:localizedShortTitle {}
:localizedTitle {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:provider ""
:redemptionChannel ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:shortTitle ""
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:title ""
:titleImage {}
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerClass"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerClass"),
Content = new StringContent("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerClass");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerClass"
payload := strings.NewReader("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/offerClass HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3342
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/offerClass")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerClass"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/offerClass")
.header("content-type", "application/json")
.body("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/offerClass');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerClass',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""},"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerClass',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n },\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerClass',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerClass',
headers: {'content-type': 'application/json'},
body: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/offerClass');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerClass',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""},"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"details": @"",
@"enableSmartTap": @NO,
@"finePrint": @"",
@"helpUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"uri": @"" },
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedDetails": @{ },
@"localizedFinePrint": @{ },
@"localizedIssuerName": @{ },
@"localizedProvider": @{ },
@"localizedShortTitle": @{ },
@"localizedTitle": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"provider": @"",
@"redemptionChannel": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"shortTitle": @"",
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"title": @"",
@"titleImage": @{ },
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerClass" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerClass",
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([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
],
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/offerClass', [
'body' => '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerClass');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
],
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
],
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/offerClass');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/offerClass", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerClass"
payload = {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": False,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerClass"
payload <- "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/offerClass') do |req|
req.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerClass";
let payload = json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"uri": ""
}),
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedDetails": json!({}),
"localizedFinePrint": json!({}),
"localizedIssuerName": json!({}),
"localizedProvider": json!({}),
"localizedShortTitle": json!({}),
"localizedTitle": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"shortTitle": "",
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"title": "",
"titleImage": json!({}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/offerClass \
--header 'content-type: application/json' \
--data '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http POST {{baseUrl}}/walletobjects/v1/offerClass \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n },\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerClass
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"uri": ""
],
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedDetails": [],
"localizedFinePrint": [],
"localizedIssuerName": [],
"localizedProvider": [],
"localizedShortTitle": [],
"localizedTitle": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"shortTitle": "",
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"title": "",
"titleImage": [],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.offerclass.list
{{baseUrl}}/walletobjects/v1/offerClass
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerClass");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/offerClass")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerClass"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerClass"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerClass");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerClass"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/offerClass HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/offerClass")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerClass"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/offerClass")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/offerClass');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/offerClass'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerClass',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerClass',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/offerClass'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/offerClass');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/offerClass'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerClass" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerClass",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/offerClass');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerClass');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/offerClass');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerClass' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerClass' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/offerClass")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerClass"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerClass"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/offerClass') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerClass";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/offerClass
http GET {{baseUrl}}/walletobjects/v1/offerClass
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerClass
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.offerclass.patch
{{baseUrl}}/walletobjects/v1/offerClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId" {:content-type :json
:form-params {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:details ""
:enableSmartTap false
:finePrint ""
:helpUri {:description ""
:id ""
:kind ""
:localizedDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:uri ""}
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedDetails {}
:localizedFinePrint {}
:localizedIssuerName {}
:localizedProvider {}
:localizedShortTitle {}
:localizedTitle {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:provider ""
:redemptionChannel ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:shortTitle ""
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:title ""
:titleImage {}
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"),
Content = new StringContent("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
payload := strings.NewReader("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/offerClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3342
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""},"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n },\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""},"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"details": @"",
@"enableSmartTap": @NO,
@"finePrint": @"",
@"helpUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"uri": @"" },
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedDetails": @{ },
@"localizedFinePrint": @{ },
@"localizedIssuerName": @{ },
@"localizedProvider": @{ },
@"localizedShortTitle": @{ },
@"localizedTitle": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"provider": @"",
@"redemptionChannel": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"shortTitle": @"",
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"title": @"",
@"titleImage": @{ },
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
],
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId', [
'body' => '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
],
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
],
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/offerClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
payload = {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": False,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
payload <- "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/offerClass/:resourceId') do |req|
req.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId";
let payload = json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"uri": ""
}),
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedDetails": json!({}),
"localizedFinePrint": json!({}),
"localizedIssuerName": json!({}),
"localizedProvider": json!({}),
"localizedShortTitle": json!({}),
"localizedTitle": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"shortTitle": "",
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"title": "",
"titleImage": json!({}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/offerClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/offerClass/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n },\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"uri": ""
],
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedDetails": [],
"localizedFinePrint": [],
"localizedIssuerName": [],
"localizedProvider": [],
"localizedShortTitle": [],
"localizedTitle": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"shortTitle": "",
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"title": "",
"titleImage": [],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.offerclass.update
{{baseUrl}}/walletobjects/v1/offerClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId" {:content-type :json
:form-params {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:details ""
:enableSmartTap false
:finePrint ""
:helpUri {:description ""
:id ""
:kind ""
:localizedDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:uri ""}
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedDetails {}
:localizedFinePrint {}
:localizedIssuerName {}
:localizedProvider {}
:localizedShortTitle {}
:localizedTitle {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:provider ""
:redemptionChannel ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:shortTitle ""
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:title ""
:titleImage {}
:version ""
:viewUnlockRequirement ""
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"),
Content = new StringContent("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
payload := strings.NewReader("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/offerClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3342
{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""},"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n },\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {
description: '',
id: '',
kind: '',
localizedDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
uri: ''
},
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{"description":"","id":"","kind":"","localizedDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"uri":""},"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"details": @"",
@"enableSmartTap": @NO,
@"finePrint": @"",
@"helpUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"uri": @"" },
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"kind": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedDetails": @{ },
@"localizedFinePrint": @{ },
@"localizedIssuerName": @{ },
@"localizedProvider": @{ },
@"localizedShortTitle": @{ },
@"localizedTitle": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"provider": @"",
@"redemptionChannel": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"shortTitle": @"",
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"title": @"",
@"titleImage": @{ },
@"version": @"",
@"viewUnlockRequirement": @"",
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerClass/:resourceId",
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([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
],
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId', [
'body' => '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
],
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'uri' => ''
],
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/offerClass/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/offerClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
payload = {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": False,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId"
payload <- "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/offerClass/:resourceId') do |req|
req.body = "{\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"uri\": \"\"\n },\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId";
let payload = json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"uri": ""
}),
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedDetails": json!({}),
"localizedFinePrint": json!({}),
"localizedIssuerName": json!({}),
"localizedProvider": json!({}),
"localizedShortTitle": json!({}),
"localizedTitle": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"shortTitle": "",
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"title": "",
"titleImage": json!({}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/offerClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}'
echo '{
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"uri": ""
},
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
}' | \
http PUT {{baseUrl}}/walletobjects/v1/offerClass/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "uri": ""\n },\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"uri": ""
],
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedDetails": [],
"localizedFinePrint": [],
"localizedIssuerName": [],
"localizedProvider": [],
"localizedShortTitle": [],
"localizedTitle": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"shortTitle": "",
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"title": "",
"titleImage": [],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.offerobject.addmessage
{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/offerObject/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerObject/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/offerObject/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/offerObject/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.offerobject.get
{{baseUrl}}/walletobjects/v1/offerObject/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/offerObject/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerObject/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/offerObject/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/offerObject/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/offerObject/:resourceId
http GET {{baseUrl}}/walletobjects/v1/offerObject/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerObject/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.offerobject.insert
{{baseUrl}}/walletobjects/v1/offerObject
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerObject");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/offerObject" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:details ""
:enableSmartTap false
:finePrint ""
:helpUri {}
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedDetails {}
:localizedFinePrint {}
:localizedIssuerName {}
:localizedProvider {}
:localizedShortTitle {}
:localizedTitle {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:provider ""
:redemptionChannel ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:shortTitle ""
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:title ""
:titleImage {}
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerObject"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerObject"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerObject");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerObject"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/offerObject HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5021
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/offerObject")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerObject"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/offerObject")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/offerObject');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{},"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerObject',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerObject',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerObject',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/offerObject');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/offerObject',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{},"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"details": @"", @"enableSmartTap": @NO, @"finePrint": @"", @"helpUri": @{ }, @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedDetails": @{ }, @"localizedFinePrint": @{ }, @"localizedIssuerName": @{ }, @"localizedProvider": @{ }, @"localizedShortTitle": @{ }, @"localizedTitle": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"provider": @"", @"redemptionChannel": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"shortTitle": @"", @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"title": @"", @"titleImage": @{ }, @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerObject" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerObject",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/offerObject', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerObject');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/offerObject');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/offerObject", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerObject"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": False,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerObject"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/offerObject') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerObject";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": json!({}),
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedDetails": json!({}),
"localizedFinePrint": json!({}),
"localizedIssuerName": json!({}),
"localizedProvider": json!({}),
"localizedShortTitle": json!({}),
"localizedTitle": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"shortTitle": "",
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"title": "",
"titleImage": json!({}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/offerObject \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http POST {{baseUrl}}/walletobjects/v1/offerObject \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerObject
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": [],
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedDetails": [],
"localizedFinePrint": [],
"localizedIssuerName": [],
"localizedProvider": [],
"localizedShortTitle": [],
"localizedTitle": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"shortTitle": "",
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"title": "",
"titleImage": [],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.offerobject.list
{{baseUrl}}/walletobjects/v1/offerObject
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerObject");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/offerObject")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerObject"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerObject"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerObject");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerObject"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/offerObject HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/offerObject")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerObject"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/offerObject")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/offerObject');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/offerObject'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerObject',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerObject',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/offerObject'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/offerObject');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/walletobjects/v1/offerObject'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerObject" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerObject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/offerObject');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerObject');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/offerObject');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerObject' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerObject' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/offerObject")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerObject"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerObject"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/offerObject') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerObject";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/offerObject
http GET {{baseUrl}}/walletobjects/v1/offerObject
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerObject
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.offerobject.patch
{{baseUrl}}/walletobjects/v1/offerObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:details ""
:enableSmartTap false
:finePrint ""
:helpUri {}
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedDetails {}
:localizedFinePrint {}
:localizedIssuerName {}
:localizedProvider {}
:localizedShortTitle {}
:localizedTitle {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:provider ""
:redemptionChannel ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:shortTitle ""
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:title ""
:titleImage {}
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/offerObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5021
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{},"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{},"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"details": @"", @"enableSmartTap": @NO, @"finePrint": @"", @"helpUri": @{ }, @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedDetails": @{ }, @"localizedFinePrint": @{ }, @"localizedIssuerName": @{ }, @"localizedProvider": @{ }, @"localizedShortTitle": @{ }, @"localizedTitle": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"provider": @"", @"redemptionChannel": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"shortTitle": @"", @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"title": @"", @"titleImage": @{ }, @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/offerObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": False,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/offerObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": json!({}),
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedDetails": json!({}),
"localizedFinePrint": json!({}),
"localizedIssuerName": json!({}),
"localizedProvider": json!({}),
"localizedShortTitle": json!({}),
"localizedTitle": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"shortTitle": "",
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"title": "",
"titleImage": json!({}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/offerObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/offerObject/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": [],
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedDetails": [],
"localizedFinePrint": [],
"localizedIssuerName": [],
"localizedProvider": [],
"localizedShortTitle": [],
"localizedTitle": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"shortTitle": "",
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"title": "",
"titleImage": [],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.offerobject.update
{{baseUrl}}/walletobjects/v1/offerObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId" {:content-type :json
:form-params {:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:details ""
:enableSmartTap false
:finePrint ""
:helpUri {}
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:kind ""
:linksModuleData {:uris [{}]}
:localizedDetails {}
:localizedFinePrint {}
:localizedIssuerName {}
:localizedProvider {}
:localizedShortTitle {}
:localizedTitle {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:provider ""
:redemptionChannel ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:shortTitle ""
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:title ""
:titleImage {}
:version ""
:viewUnlockRequirement ""
:wordMark {}}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:id ""
:imageModulesData [{}]
:infoModuleData {}
:kind ""
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"),
Content = new StringContent("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
payload := strings.NewReader("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/offerObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5021
{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{},"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/offerObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {
uris: [
{}
]
},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
shortTitle: '',
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
details: '',
enableSmartTap: false,
finePrint: '',
helpUri: {},
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
kind: '',
linksModuleData: {uris: [{}]},
localizedDetails: {},
localizedFinePrint: {},
localizedIssuerName: {},
localizedProvider: {},
localizedShortTitle: {},
localizedTitle: {},
locations: [{kind: '', latitude: '', longitude: ''}],
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
provider: '',
redemptionChannel: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
shortTitle: '',
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
title: '',
titleImage: {},
version: '',
viewUnlockRequirement: '',
wordMark: {}
},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
id: '',
imageModulesData: [{}],
infoModuleData: {},
kind: '',
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","details":"","enableSmartTap":false,"finePrint":"","helpUri":{},"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","kind":"","linksModuleData":{"uris":[{}]},"localizedDetails":{},"localizedFinePrint":{},"localizedIssuerName":{},"localizedProvider":{},"localizedShortTitle":{},"localizedTitle":{},"locations":[{"kind":"","latitude":"","longitude":""}],"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","provider":"","redemptionChannel":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"shortTitle":"","textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"title":"","titleImage":{},"version":"","viewUnlockRequirement":"","wordMark":{}},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"id":"","imageModulesData":[{}],"infoModuleData":{},"kind":"","linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"details": @"", @"enableSmartTap": @NO, @"finePrint": @"", @"helpUri": @{ }, @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"kind": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedDetails": @{ }, @"localizedFinePrint": @{ }, @"localizedIssuerName": @{ }, @"localizedProvider": @{ }, @"localizedShortTitle": @{ }, @"localizedTitle": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"provider": @"", @"redemptionChannel": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"shortTitle": @"", @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"title": @"", @"titleImage": @{ }, @"version": @"", @"viewUnlockRequirement": @"", @"wordMark": @{ } },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"kind": @"",
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/offerObject/:resourceId",
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([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId', [
'body' => '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'details' => '',
'enableSmartTap' => null,
'finePrint' => '',
'helpUri' => [
],
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'kind' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedDetails' => [
],
'localizedFinePrint' => [
],
'localizedIssuerName' => [
],
'localizedProvider' => [
],
'localizedShortTitle' => [
],
'localizedTitle' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'provider' => '',
'redemptionChannel' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'shortTitle' => '',
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'title' => '',
'titleImage' => [
],
'version' => '',
'viewUnlockRequirement' => '',
'wordMark' => [
]
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'kind' => '',
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/offerObject/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/offerObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/offerObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
payload = {
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": False,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"kind": "",
"linksModuleData": { "uris": [{}] },
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId"
payload <- "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/offerObject/:resourceId') do |req|
req.body = "{\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"details\": \"\",\n \"enableSmartTap\": false,\n \"finePrint\": \"\",\n \"helpUri\": {},\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"kind\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedDetails\": {},\n \"localizedFinePrint\": {},\n \"localizedIssuerName\": {},\n \"localizedProvider\": {},\n \"localizedShortTitle\": {},\n \"localizedTitle\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"provider\": \"\",\n \"redemptionChannel\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"shortTitle\": \"\",\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"title\": \"\",\n \"titleImage\": {},\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"wordMark\": {}\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"kind\": \"\",\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId";
let payload = json!({
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": json!({}),
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"kind": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedDetails": json!({}),
"localizedFinePrint": json!({}),
"localizedIssuerName": json!({}),
"localizedProvider": json!({}),
"localizedShortTitle": json!({}),
"localizedTitle": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"shortTitle": "",
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"title": "",
"titleImage": json!({}),
"version": "",
"viewUnlockRequirement": "",
"wordMark": json!({})
}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"kind": "",
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/offerObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}'
echo '{
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": {},
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"kind": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedDetails": {},
"localizedFinePrint": {},
"localizedIssuerName": {},
"localizedProvider": {},
"localizedShortTitle": {},
"localizedTitle": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"shortTitle": "",
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"title": "",
"titleImage": {},
"version": "",
"viewUnlockRequirement": "",
"wordMark": {}
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"kind": "",
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"validTimeInterval": {},
"version": ""
}' | \
http PUT {{baseUrl}}/walletobjects/v1/offerObject/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "details": "",\n "enableSmartTap": false,\n "finePrint": "",\n "helpUri": {},\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "kind": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedDetails": {},\n "localizedFinePrint": {},\n "localizedIssuerName": {},\n "localizedProvider": {},\n "localizedShortTitle": {},\n "localizedTitle": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "provider": "",\n "redemptionChannel": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "shortTitle": "",\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "title": "",\n "titleImage": {},\n "version": "",\n "viewUnlockRequirement": "",\n "wordMark": {}\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "kind": "",\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/offerObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"details": "",
"enableSmartTap": false,
"finePrint": "",
"helpUri": [],
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"kind": "",
"linksModuleData": ["uris": [[]]],
"localizedDetails": [],
"localizedFinePrint": [],
"localizedIssuerName": [],
"localizedProvider": [],
"localizedShortTitle": [],
"localizedTitle": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"provider": "",
"redemptionChannel": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"shortTitle": "",
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"title": "",
"titleImage": [],
"version": "",
"viewUnlockRequirement": "",
"wordMark": []
],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"kind": "",
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/offerObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.permissions.get
{{baseUrl}}/walletobjects/v1/permissions/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/permissions/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/permissions/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/permissions/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/permissions/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/permissions/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/permissions/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/permissions/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/permissions/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/permissions/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/permissions/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/permissions/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/permissions/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/permissions/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/permissions/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/permissions/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/permissions/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/permissions/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/permissions/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/permissions/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/permissions/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/permissions/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/permissions/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/permissions/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/permissions/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/permissions/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/permissions/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/permissions/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/permissions/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/permissions/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/permissions/:resourceId
http GET {{baseUrl}}/walletobjects/v1/permissions/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/permissions/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/permissions/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.permissions.update
{{baseUrl}}/walletobjects/v1/permissions/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"issuerId": "",
"permissions": [
{
"emailAddress": "",
"role": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/permissions/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/permissions/:resourceId" {:content-type :json
:form-params {:issuerId ""
:permissions [{:emailAddress ""
:role ""}]}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/permissions/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/permissions/:resourceId"),
Content = new StringContent("{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/permissions/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/permissions/:resourceId"
payload := strings.NewReader("{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/permissions/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 99
{
"issuerId": "",
"permissions": [
{
"emailAddress": "",
"role": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/permissions/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
.header("content-type", "application/json")
.body("{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
issuerId: '',
permissions: [
{
emailAddress: '',
role: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/permissions/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/permissions/:resourceId',
headers: {'content-type': 'application/json'},
data: {issuerId: '', permissions: [{emailAddress: '', role: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/permissions/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"issuerId":"","permissions":[{"emailAddress":"","role":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/permissions/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "issuerId": "",\n "permissions": [\n {\n "emailAddress": "",\n "role": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/permissions/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({issuerId: '', permissions: [{emailAddress: '', role: ''}]}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/permissions/:resourceId',
headers: {'content-type': 'application/json'},
body: {issuerId: '', permissions: [{emailAddress: '', role: ''}]},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/permissions/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
issuerId: '',
permissions: [
{
emailAddress: '',
role: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/permissions/:resourceId',
headers: {'content-type': 'application/json'},
data: {issuerId: '', permissions: [{emailAddress: '', role: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/permissions/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"issuerId":"","permissions":[{"emailAddress":"","role":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"issuerId": @"",
@"permissions": @[ @{ @"emailAddress": @"", @"role": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/permissions/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/permissions/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/permissions/:resourceId",
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([
'issuerId' => '',
'permissions' => [
[
'emailAddress' => '',
'role' => ''
]
]
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/permissions/:resourceId', [
'body' => '{
"issuerId": "",
"permissions": [
{
"emailAddress": "",
"role": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/permissions/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'issuerId' => '',
'permissions' => [
[
'emailAddress' => '',
'role' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'issuerId' => '',
'permissions' => [
[
'emailAddress' => '',
'role' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/permissions/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/permissions/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"issuerId": "",
"permissions": [
{
"emailAddress": "",
"role": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/permissions/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"issuerId": "",
"permissions": [
{
"emailAddress": "",
"role": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/permissions/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/permissions/:resourceId"
payload = {
"issuerId": "",
"permissions": [
{
"emailAddress": "",
"role": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/permissions/:resourceId"
payload <- "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/permissions/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/permissions/:resourceId') do |req|
req.body = "{\n \"issuerId\": \"\",\n \"permissions\": [\n {\n \"emailAddress\": \"\",\n \"role\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/permissions/:resourceId";
let payload = json!({
"issuerId": "",
"permissions": (
json!({
"emailAddress": "",
"role": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/permissions/:resourceId \
--header 'content-type: application/json' \
--data '{
"issuerId": "",
"permissions": [
{
"emailAddress": "",
"role": ""
}
]
}'
echo '{
"issuerId": "",
"permissions": [
{
"emailAddress": "",
"role": ""
}
]
}' | \
http PUT {{baseUrl}}/walletobjects/v1/permissions/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "issuerId": "",\n "permissions": [\n {\n "emailAddress": "",\n "role": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/permissions/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"issuerId": "",
"permissions": [
[
"emailAddress": "",
"role": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/permissions/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.smarttap.insert
{{baseUrl}}/walletobjects/v1/smartTap
BODY json
{
"id": "",
"infos": [
{
"action": "",
"signUpInfo": {
"classId": ""
},
"url": "",
"value": ""
}
],
"kind": "",
"merchantId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/smartTap");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/smartTap" {:content-type :json
:form-params {:id ""
:infos [{:action ""
:signUpInfo {:classId ""}
:url ""
:value ""}]
:kind ""
:merchantId ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/smartTap"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/smartTap"),
Content = new StringContent("{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/smartTap");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/smartTap"
payload := strings.NewReader("{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/smartTap HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 186
{
"id": "",
"infos": [
{
"action": "",
"signUpInfo": {
"classId": ""
},
"url": "",
"value": ""
}
],
"kind": "",
"merchantId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/smartTap")
.setHeader("content-type", "application/json")
.setBody("{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/smartTap"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/smartTap")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/smartTap")
.header("content-type", "application/json")
.body("{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}")
.asString();
const data = JSON.stringify({
id: '',
infos: [
{
action: '',
signUpInfo: {
classId: ''
},
url: '',
value: ''
}
],
kind: '',
merchantId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/smartTap');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/smartTap',
headers: {'content-type': 'application/json'},
data: {
id: '',
infos: [{action: '', signUpInfo: {classId: ''}, url: '', value: ''}],
kind: '',
merchantId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/smartTap';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"id":"","infos":[{"action":"","signUpInfo":{"classId":""},"url":"","value":""}],"kind":"","merchantId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/smartTap',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "id": "",\n "infos": [\n {\n "action": "",\n "signUpInfo": {\n "classId": ""\n },\n "url": "",\n "value": ""\n }\n ],\n "kind": "",\n "merchantId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/smartTap")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/smartTap',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
id: '',
infos: [{action: '', signUpInfo: {classId: ''}, url: '', value: ''}],
kind: '',
merchantId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/smartTap',
headers: {'content-type': 'application/json'},
body: {
id: '',
infos: [{action: '', signUpInfo: {classId: ''}, url: '', value: ''}],
kind: '',
merchantId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/smartTap');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
id: '',
infos: [
{
action: '',
signUpInfo: {
classId: ''
},
url: '',
value: ''
}
],
kind: '',
merchantId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/smartTap',
headers: {'content-type': 'application/json'},
data: {
id: '',
infos: [{action: '', signUpInfo: {classId: ''}, url: '', value: ''}],
kind: '',
merchantId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/smartTap';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"id":"","infos":[{"action":"","signUpInfo":{"classId":""},"url":"","value":""}],"kind":"","merchantId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"id": @"",
@"infos": @[ @{ @"action": @"", @"signUpInfo": @{ @"classId": @"" }, @"url": @"", @"value": @"" } ],
@"kind": @"",
@"merchantId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/smartTap"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/smartTap" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/smartTap",
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([
'id' => '',
'infos' => [
[
'action' => '',
'signUpInfo' => [
'classId' => ''
],
'url' => '',
'value' => ''
]
],
'kind' => '',
'merchantId' => ''
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/smartTap', [
'body' => '{
"id": "",
"infos": [
{
"action": "",
"signUpInfo": {
"classId": ""
},
"url": "",
"value": ""
}
],
"kind": "",
"merchantId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/smartTap');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'id' => '',
'infos' => [
[
'action' => '',
'signUpInfo' => [
'classId' => ''
],
'url' => '',
'value' => ''
]
],
'kind' => '',
'merchantId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'id' => '',
'infos' => [
[
'action' => '',
'signUpInfo' => [
'classId' => ''
],
'url' => '',
'value' => ''
]
],
'kind' => '',
'merchantId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/smartTap');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/smartTap' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"infos": [
{
"action": "",
"signUpInfo": {
"classId": ""
},
"url": "",
"value": ""
}
],
"kind": "",
"merchantId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/smartTap' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"infos": [
{
"action": "",
"signUpInfo": {
"classId": ""
},
"url": "",
"value": ""
}
],
"kind": "",
"merchantId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/smartTap", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/smartTap"
payload = {
"id": "",
"infos": [
{
"action": "",
"signUpInfo": { "classId": "" },
"url": "",
"value": ""
}
],
"kind": "",
"merchantId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/smartTap"
payload <- "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/smartTap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/smartTap') do |req|
req.body = "{\n \"id\": \"\",\n \"infos\": [\n {\n \"action\": \"\",\n \"signUpInfo\": {\n \"classId\": \"\"\n },\n \"url\": \"\",\n \"value\": \"\"\n }\n ],\n \"kind\": \"\",\n \"merchantId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/smartTap";
let payload = json!({
"id": "",
"infos": (
json!({
"action": "",
"signUpInfo": json!({"classId": ""}),
"url": "",
"value": ""
})
),
"kind": "",
"merchantId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/smartTap \
--header 'content-type: application/json' \
--data '{
"id": "",
"infos": [
{
"action": "",
"signUpInfo": {
"classId": ""
},
"url": "",
"value": ""
}
],
"kind": "",
"merchantId": ""
}'
echo '{
"id": "",
"infos": [
{
"action": "",
"signUpInfo": {
"classId": ""
},
"url": "",
"value": ""
}
],
"kind": "",
"merchantId": ""
}' | \
http POST {{baseUrl}}/walletobjects/v1/smartTap \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "id": "",\n "infos": [\n {\n "action": "",\n "signUpInfo": {\n "classId": ""\n },\n "url": "",\n "value": ""\n }\n ],\n "kind": "",\n "merchantId": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/smartTap
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"id": "",
"infos": [
[
"action": "",
"signUpInfo": ["classId": ""],
"url": "",
"value": ""
]
],
"kind": "",
"merchantId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/smartTap")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.transitclass.addmessage
{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/transitClass/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitClass/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/transitClass/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/transitClass/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.transitclass.get
{{baseUrl}}/walletobjects/v1/transitClass/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/transitClass/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitClass/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/transitClass/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/transitClass/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/transitClass/:resourceId
http GET {{baseUrl}}/walletobjects/v1/transitClass/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitClass/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.transitclass.insert
{{baseUrl}}/walletobjects/v1/transitClass
BODY json
{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitClass");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/transitClass" {:content-type :json
:form-params {:activationOptions {:activationUrl ""
:allowReactivation false}
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:customCarriageLabel {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:customCoachLabel {}
:customConcessionCategoryLabel {}
:customConfirmationCodeLabel {}
:customDiscountMessageLabel {}
:customFareClassLabel {}
:customFareNameLabel {}
:customOtherRestrictionsLabel {}
:customPlatformLabel {}
:customPurchaseFaceValueLabel {}
:customPurchasePriceLabel {}
:customPurchaseReceiptNumberLabel {}
:customRouteRestrictionsDetailsLabel {}
:customRouteRestrictionsLabel {}
:customSeatLabel {}
:customTicketNumberLabel {}
:customTimeRestrictionsLabel {}
:customTransitTerminusNameLabel {}
:customZoneLabel {}
:enableSingleLegItinerary false
:enableSmartTap false
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:transitOperatorName {}
:transitType ""
:version ""
:viewUnlockRequirement ""
:watermark {}
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitClass"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitClass"),
Content = new StringContent("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitClass");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitClass"
payload := strings.NewReader("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/transitClass HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3903
{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/transitClass")
.setHeader("content-type", "application/json")
.setBody("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitClass"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/transitClass")
.header("content-type", "application/json")
.body("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/transitClass');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitClass',
headers: {'content-type': 'application/json'},
data: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitClass',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitClass',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitClass',
headers: {'content-type': 'application/json'},
body: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/transitClass');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitClass',
headers: {'content-type': 'application/json'},
data: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitClass';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"activationOptions": @{ @"activationUrl": @"", @"allowReactivation": @NO },
@"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"customCarriageLabel": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] },
@"customCoachLabel": @{ },
@"customConcessionCategoryLabel": @{ },
@"customConfirmationCodeLabel": @{ },
@"customDiscountMessageLabel": @{ },
@"customFareClassLabel": @{ },
@"customFareNameLabel": @{ },
@"customOtherRestrictionsLabel": @{ },
@"customPlatformLabel": @{ },
@"customPurchaseFaceValueLabel": @{ },
@"customPurchasePriceLabel": @{ },
@"customPurchaseReceiptNumberLabel": @{ },
@"customRouteRestrictionsDetailsLabel": @{ },
@"customRouteRestrictionsLabel": @{ },
@"customSeatLabel": @{ },
@"customTicketNumberLabel": @{ },
@"customTimeRestrictionsLabel": @{ },
@"customTransitTerminusNameLabel": @{ },
@"customZoneLabel": @{ },
@"enableSingleLegItinerary": @NO,
@"enableSmartTap": @NO,
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"languageOverride": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedIssuerName": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"logo": @{ },
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"transitOperatorName": @{ },
@"transitType": @"",
@"version": @"",
@"viewUnlockRequirement": @"",
@"watermark": @{ },
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitClass" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitClass",
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([
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/transitClass', [
'body' => '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitClass');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/transitClass');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitClass' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/transitClass", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitClass"
payload = {
"activationOptions": {
"activationUrl": "",
"allowReactivation": False
},
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": False,
"enableSmartTap": False,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitClass"
payload <- "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/transitClass') do |req|
req.body = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitClass";
let payload = json!({
"activationOptions": json!({
"activationUrl": "",
"allowReactivation": false
}),
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"customCarriageLabel": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"customCoachLabel": json!({}),
"customConcessionCategoryLabel": json!({}),
"customConfirmationCodeLabel": json!({}),
"customDiscountMessageLabel": json!({}),
"customFareClassLabel": json!({}),
"customFareNameLabel": json!({}),
"customOtherRestrictionsLabel": json!({}),
"customPlatformLabel": json!({}),
"customPurchaseFaceValueLabel": json!({}),
"customPurchasePriceLabel": json!({}),
"customPurchaseReceiptNumberLabel": json!({}),
"customRouteRestrictionsDetailsLabel": json!({}),
"customRouteRestrictionsLabel": json!({}),
"customSeatLabel": json!({}),
"customTicketNumberLabel": json!({}),
"customTimeRestrictionsLabel": json!({}),
"customTransitTerminusNameLabel": json!({}),
"customZoneLabel": json!({}),
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"transitOperatorName": json!({}),
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": json!({}),
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/transitClass \
--header 'content-type: application/json' \
--data '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}'
echo '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}' | \
http POST {{baseUrl}}/walletobjects/v1/transitClass \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitClass
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"activationOptions": [
"activationUrl": "",
"allowReactivation": false
],
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"customCarriageLabel": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"customCoachLabel": [],
"customConcessionCategoryLabel": [],
"customConfirmationCodeLabel": [],
"customDiscountMessageLabel": [],
"customFareClassLabel": [],
"customFareNameLabel": [],
"customOtherRestrictionsLabel": [],
"customPlatformLabel": [],
"customPurchaseFaceValueLabel": [],
"customPurchasePriceLabel": [],
"customPurchaseReceiptNumberLabel": [],
"customRouteRestrictionsDetailsLabel": [],
"customRouteRestrictionsLabel": [],
"customSeatLabel": [],
"customTicketNumberLabel": [],
"customTimeRestrictionsLabel": [],
"customTransitTerminusNameLabel": [],
"customZoneLabel": [],
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"transitOperatorName": [],
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": [],
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.transitclass.list
{{baseUrl}}/walletobjects/v1/transitClass
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitClass");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/transitClass")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitClass"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitClass"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitClass");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitClass"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/transitClass HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/transitClass")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitClass"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/transitClass")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/transitClass');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitClass',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitClass',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitClass'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/transitClass');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitClass'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitClass';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitClass"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitClass" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitClass",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/transitClass');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitClass');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/transitClass');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitClass' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitClass' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/transitClass")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitClass"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitClass"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitClass")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/transitClass') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitClass";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/transitClass
http GET {{baseUrl}}/walletobjects/v1/transitClass
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitClass
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitClass")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.transitclass.patch
{{baseUrl}}/walletobjects/v1/transitClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId" {:content-type :json
:form-params {:activationOptions {:activationUrl ""
:allowReactivation false}
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:customCarriageLabel {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:customCoachLabel {}
:customConcessionCategoryLabel {}
:customConfirmationCodeLabel {}
:customDiscountMessageLabel {}
:customFareClassLabel {}
:customFareNameLabel {}
:customOtherRestrictionsLabel {}
:customPlatformLabel {}
:customPurchaseFaceValueLabel {}
:customPurchasePriceLabel {}
:customPurchaseReceiptNumberLabel {}
:customRouteRestrictionsDetailsLabel {}
:customRouteRestrictionsLabel {}
:customSeatLabel {}
:customTicketNumberLabel {}
:customTimeRestrictionsLabel {}
:customTransitTerminusNameLabel {}
:customZoneLabel {}
:enableSingleLegItinerary false
:enableSmartTap false
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:transitOperatorName {}
:transitType ""
:version ""
:viewUnlockRequirement ""
:watermark {}
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"),
Content = new StringContent("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
payload := strings.NewReader("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/transitClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3903
{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"activationOptions": @{ @"activationUrl": @"", @"allowReactivation": @NO },
@"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"customCarriageLabel": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] },
@"customCoachLabel": @{ },
@"customConcessionCategoryLabel": @{ },
@"customConfirmationCodeLabel": @{ },
@"customDiscountMessageLabel": @{ },
@"customFareClassLabel": @{ },
@"customFareNameLabel": @{ },
@"customOtherRestrictionsLabel": @{ },
@"customPlatformLabel": @{ },
@"customPurchaseFaceValueLabel": @{ },
@"customPurchasePriceLabel": @{ },
@"customPurchaseReceiptNumberLabel": @{ },
@"customRouteRestrictionsDetailsLabel": @{ },
@"customRouteRestrictionsLabel": @{ },
@"customSeatLabel": @{ },
@"customTicketNumberLabel": @{ },
@"customTimeRestrictionsLabel": @{ },
@"customTransitTerminusNameLabel": @{ },
@"customZoneLabel": @{ },
@"enableSingleLegItinerary": @NO,
@"enableSmartTap": @NO,
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"languageOverride": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedIssuerName": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"logo": @{ },
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"transitOperatorName": @{ },
@"transitType": @"",
@"version": @"",
@"viewUnlockRequirement": @"",
@"watermark": @{ },
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitClass/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId', [
'body' => '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/transitClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
payload = {
"activationOptions": {
"activationUrl": "",
"allowReactivation": False
},
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": False,
"enableSmartTap": False,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
payload <- "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/transitClass/:resourceId') do |req|
req.body = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId";
let payload = json!({
"activationOptions": json!({
"activationUrl": "",
"allowReactivation": false
}),
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"customCarriageLabel": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"customCoachLabel": json!({}),
"customConcessionCategoryLabel": json!({}),
"customConfirmationCodeLabel": json!({}),
"customDiscountMessageLabel": json!({}),
"customFareClassLabel": json!({}),
"customFareNameLabel": json!({}),
"customOtherRestrictionsLabel": json!({}),
"customPlatformLabel": json!({}),
"customPurchaseFaceValueLabel": json!({}),
"customPurchasePriceLabel": json!({}),
"customPurchaseReceiptNumberLabel": json!({}),
"customRouteRestrictionsDetailsLabel": json!({}),
"customRouteRestrictionsLabel": json!({}),
"customSeatLabel": json!({}),
"customTicketNumberLabel": json!({}),
"customTimeRestrictionsLabel": json!({}),
"customTransitTerminusNameLabel": json!({}),
"customZoneLabel": json!({}),
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"transitOperatorName": json!({}),
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": json!({}),
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/transitClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}'
echo '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/transitClass/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"activationOptions": [
"activationUrl": "",
"allowReactivation": false
],
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"customCarriageLabel": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"customCoachLabel": [],
"customConcessionCategoryLabel": [],
"customConfirmationCodeLabel": [],
"customDiscountMessageLabel": [],
"customFareClassLabel": [],
"customFareNameLabel": [],
"customOtherRestrictionsLabel": [],
"customPlatformLabel": [],
"customPurchaseFaceValueLabel": [],
"customPurchasePriceLabel": [],
"customPurchaseReceiptNumberLabel": [],
"customRouteRestrictionsDetailsLabel": [],
"customRouteRestrictionsLabel": [],
"customSeatLabel": [],
"customTicketNumberLabel": [],
"customTimeRestrictionsLabel": [],
"customTransitTerminusNameLabel": [],
"customZoneLabel": [],
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"transitOperatorName": [],
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": [],
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.transitclass.update
{{baseUrl}}/walletobjects/v1/transitClass/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId" {:content-type :json
:form-params {:activationOptions {:activationUrl ""
:allowReactivation false}
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:customCarriageLabel {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:customCoachLabel {}
:customConcessionCategoryLabel {}
:customConfirmationCodeLabel {}
:customDiscountMessageLabel {}
:customFareClassLabel {}
:customFareNameLabel {}
:customOtherRestrictionsLabel {}
:customPlatformLabel {}
:customPurchaseFaceValueLabel {}
:customPurchasePriceLabel {}
:customPurchaseReceiptNumberLabel {}
:customRouteRestrictionsDetailsLabel {}
:customRouteRestrictionsLabel {}
:customSeatLabel {}
:customTicketNumberLabel {}
:customTimeRestrictionsLabel {}
:customTransitTerminusNameLabel {}
:customZoneLabel {}
:enableSingleLegItinerary false
:enableSmartTap false
:heroImage {:contentDescription {}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:hexBackgroundColor ""
:homepageUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:transitOperatorName {}
:transitType ""
:version ""
:viewUnlockRequirement ""
:watermark {}
:wordMark {}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"),
Content = new StringContent("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
payload := strings.NewReader("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/transitClass/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3903
{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.header("content-type", "application/json")
.body("{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
.asString();
const data = JSON.stringify({
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitClass/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId',
headers: {'content-type': 'application/json'},
body: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
hexBackgroundColor: '',
homepageUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId',
headers: {'content-type': 'application/json'},
data: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {
contentDescription: {},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
hexBackgroundColor: '',
homepageUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{"contentDescription":{},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"hexBackgroundColor":"","homepageUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"activationOptions": @{ @"activationUrl": @"", @"allowReactivation": @NO },
@"allowMultipleUsersPerObject": @NO,
@"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" },
@"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } },
@"countryCode": @"",
@"customCarriageLabel": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] },
@"customCoachLabel": @{ },
@"customConcessionCategoryLabel": @{ },
@"customConfirmationCodeLabel": @{ },
@"customDiscountMessageLabel": @{ },
@"customFareClassLabel": @{ },
@"customFareNameLabel": @{ },
@"customOtherRestrictionsLabel": @{ },
@"customPlatformLabel": @{ },
@"customPurchaseFaceValueLabel": @{ },
@"customPurchasePriceLabel": @{ },
@"customPurchaseReceiptNumberLabel": @{ },
@"customRouteRestrictionsDetailsLabel": @{ },
@"customRouteRestrictionsLabel": @{ },
@"customSeatLabel": @{ },
@"customTicketNumberLabel": @{ },
@"customTimeRestrictionsLabel": @{ },
@"customTransitTerminusNameLabel": @{ },
@"customZoneLabel": @{ },
@"enableSingleLegItinerary": @NO,
@"enableSmartTap": @NO,
@"heroImage": @{ @"contentDescription": @{ }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } },
@"hexBackgroundColor": @"",
@"homepageUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" },
@"id": @"",
@"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ],
@"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO },
@"issuerName": @"",
@"languageOverride": @"",
@"linksModuleData": @{ @"uris": @[ @{ } ] },
@"localizedIssuerName": @{ },
@"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ],
@"logo": @{ },
@"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ],
@"multipleDevicesAndHoldersAllowedStatus": @"",
@"redemptionIssuers": @[ ],
@"review": @{ @"comments": @"" },
@"reviewStatus": @"",
@"securityAnimation": @{ @"animationType": @"" },
@"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ],
@"transitOperatorName": @{ },
@"transitType": @"",
@"version": @"",
@"viewUnlockRequirement": @"",
@"watermark": @{ },
@"wordMark": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitClass/:resourceId",
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([
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId', [
'body' => '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
'contentDescription' => [
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'hexBackgroundColor' => '',
'homepageUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/transitClass/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitClass/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/transitClass/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
payload = {
"activationOptions": {
"activationUrl": "",
"allowReactivation": False
},
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": False,
"enableSmartTap": False,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId"
payload <- "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/transitClass/:resourceId') do |req|
req.body = "{\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {\n \"contentDescription\": {},\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n },\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId";
let payload = json!({
"activationOptions": json!({
"activationUrl": "",
"allowReactivation": false
}),
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"customCarriageLabel": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"customCoachLabel": json!({}),
"customConcessionCategoryLabel": json!({}),
"customConfirmationCodeLabel": json!({}),
"customDiscountMessageLabel": json!({}),
"customFareClassLabel": json!({}),
"customFareNameLabel": json!({}),
"customOtherRestrictionsLabel": json!({}),
"customPlatformLabel": json!({}),
"customPurchaseFaceValueLabel": json!({}),
"customPurchasePriceLabel": json!({}),
"customPurchaseReceiptNumberLabel": json!({}),
"customRouteRestrictionsDetailsLabel": json!({}),
"customRouteRestrictionsLabel": json!({}),
"customSeatLabel": json!({}),
"customTicketNumberLabel": json!({}),
"customTimeRestrictionsLabel": json!({}),
"customTransitTerminusNameLabel": json!({}),
"customZoneLabel": json!({}),
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": json!({
"contentDescription": json!({}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"hexBackgroundColor": "",
"homepageUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"transitOperatorName": json!({}),
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": json!({}),
"wordMark": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/transitClass/:resourceId \
--header 'content-type: application/json' \
--data '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}'
echo '{
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {
"contentDescription": {},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"hexBackgroundColor": "",
"homepageUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
}' | \
http PUT {{baseUrl}}/walletobjects/v1/transitClass/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {\n "contentDescription": {},\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "hexBackgroundColor": "",\n "homepageUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n },\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitClass/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"activationOptions": [
"activationUrl": "",
"allowReactivation": false
],
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"customCarriageLabel": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"customCoachLabel": [],
"customConcessionCategoryLabel": [],
"customConfirmationCodeLabel": [],
"customDiscountMessageLabel": [],
"customFareClassLabel": [],
"customFareNameLabel": [],
"customOtherRestrictionsLabel": [],
"customPlatformLabel": [],
"customPurchaseFaceValueLabel": [],
"customPurchasePriceLabel": [],
"customPurchaseReceiptNumberLabel": [],
"customRouteRestrictionsDetailsLabel": [],
"customRouteRestrictionsLabel": [],
"customSeatLabel": [],
"customTicketNumberLabel": [],
"customTimeRestrictionsLabel": [],
"customTransitTerminusNameLabel": [],
"customZoneLabel": [],
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": [
"contentDescription": [],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"hexBackgroundColor": "",
"homepageUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"transitOperatorName": [],
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": [],
"wordMark": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitClass/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.transitobject.addmessage
{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage
QUERY PARAMS
resourceId
BODY json
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage" {:content-type :json
:form-params {:message {:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:localizedHeader {}
:messageType ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage"),
Content = new StringContent("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage"
payload := strings.NewReader("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/transitObject/:resourceId/addMessage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 438
{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage")
.setHeader("content-type", "application/json")
.setBody("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage")
.header("content-type", "application/json")
.body("{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitObject/:resourceId/addMessage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
body: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
message: {
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
localizedHeader: {},
messageType: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage',
headers: {'content-type': 'application/json'},
data: {
message: {
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
localizedHeader: {},
messageType: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"message":{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"localizedHeader":{},"messageType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"message": @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"localizedHeader": @{ }, @"messageType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage",
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([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage', [
'body' => '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'message' => [
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'localizedHeader' => [
],
'messageType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/transitObject/:resourceId/addMessage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage"
payload = { "message": {
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"localizedHeader": {},
"messageType": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage"
payload <- "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/transitObject/:resourceId/addMessage') do |req|
req.body = "{\n \"message\": {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage";
let payload = json!({"message": json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"localizedHeader": json!({}),
"messageType": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage \
--header 'content-type: application/json' \
--data '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}'
echo '{
"message": {
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"localizedHeader": {},
"messageType": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "message": {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "localizedHeader": {},\n "messageType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["message": [
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"localizedHeader": [],
"messageType": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId/addMessage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.transitobject.get
{{baseUrl}}/walletobjects/v1/transitObject/:resourceId
QUERY PARAMS
resourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/transitObject/:resourceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitObject/:resourceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/transitObject/:resourceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/transitObject/:resourceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/transitObject/:resourceId
http GET {{baseUrl}}/walletobjects/v1/transitObject/:resourceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitObject/:resourceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.transitobject.insert
{{baseUrl}}/walletobjects/v1/transitObject
BODY json
{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitObject");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/transitObject" {:content-type :json
:form-params {:activationStatus {:state ""}
:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:activationOptions {:activationUrl ""
:allowReactivation false}
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:customCarriageLabel {}
:customCoachLabel {}
:customConcessionCategoryLabel {}
:customConfirmationCodeLabel {}
:customDiscountMessageLabel {}
:customFareClassLabel {}
:customFareNameLabel {}
:customOtherRestrictionsLabel {}
:customPlatformLabel {}
:customPurchaseFaceValueLabel {}
:customPurchasePriceLabel {}
:customPurchaseReceiptNumberLabel {}
:customRouteRestrictionsDetailsLabel {}
:customRouteRestrictionsLabel {}
:customSeatLabel {}
:customTicketNumberLabel {}
:customTimeRestrictionsLabel {}
:customTransitTerminusNameLabel {}
:customZoneLabel {}
:enableSingleLegItinerary false
:enableSmartTap false
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:transitOperatorName {}
:transitType ""
:version ""
:viewUnlockRequirement ""
:watermark {}
:wordMark {}}
:concessionCategory ""
:customConcessionCategory {}
:customTicketStatus {}
:deviceContext {:deviceToken ""}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{}]
:infoModuleData {}
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:passengerNames ""
:passengerType ""
:purchaseDetails {:accountId ""
:confirmationCode ""
:purchaseDateTime ""
:purchaseReceiptNumber ""
:ticketCost {:discountMessage {}
:faceValue {:currencyCode ""
:kind ""
:micros ""}
:purchasePrice {}}}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:ticketLeg {:arrivalDateTime ""
:carriage ""
:departureDateTime ""
:destinationName {}
:destinationStationCode ""
:fareName {}
:originName {}
:originStationCode ""
:platform ""
:ticketSeat {:coach ""
:customFareClass {}
:fareClass ""
:seat ""
:seatAssignment {}}
:ticketSeats [{}]
:transitOperatorName {}
:transitTerminusName {}
:zone ""}
:ticketLegs [{}]
:ticketNumber ""
:ticketRestrictions {:otherRestrictions {}
:routeRestrictions {}
:routeRestrictionsDetails {}
:timeRestrictions {}}
:ticketStatus ""
:tripId ""
:tripType ""
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitObject"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitObject"),
Content = new StringContent("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitObject");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitObject"
payload := strings.NewReader("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/transitObject HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6961
{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/transitObject")
.setHeader("content-type", "application/json")
.setBody("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitObject"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/transitObject")
.header("content-type", "application/json")
.body("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
activationStatus: {
state: ''
},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {
deviceToken: ''
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {
coach: '',
customFareClass: {},
fareClass: '',
seat: '',
seatAssignment: {}
},
ticketSeats: [
{}
],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [
{}
],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/transitObject');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitObject',
headers: {'content-type': 'application/json'},
data: {
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"activationStatus":{"state":""},"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}},"concessionCategory":"","customConcessionCategory":{},"customTicketStatus":{},"deviceContext":{"deviceToken":""},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerNames":"","passengerType":"","purchaseDetails":{"accountId":"","confirmationCode":"","purchaseDateTime":"","purchaseReceiptNumber":"","ticketCost":{"discountMessage":{},"faceValue":{"currencyCode":"","kind":"","micros":""},"purchasePrice":{}}},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketLeg":{"arrivalDateTime":"","carriage":"","departureDateTime":"","destinationName":{},"destinationStationCode":"","fareName":{},"originName":{},"originStationCode":"","platform":"","ticketSeat":{"coach":"","customFareClass":{},"fareClass":"","seat":"","seatAssignment":{}},"ticketSeats":[{}],"transitOperatorName":{},"transitTerminusName":{},"zone":""},"ticketLegs":[{}],"ticketNumber":"","ticketRestrictions":{"otherRestrictions":{},"routeRestrictions":{},"routeRestrictionsDetails":{},"timeRestrictions":{}},"ticketStatus":"","tripId":"","tripType":"","validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitObject',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "activationStatus": {\n "state": ""\n },\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {},\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n },\n "concessionCategory": "",\n "customConcessionCategory": {},\n "customTicketStatus": {},\n "deviceContext": {\n "deviceToken": ""\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerNames": "",\n "passengerType": "",\n "purchaseDetails": {\n "accountId": "",\n "confirmationCode": "",\n "purchaseDateTime": "",\n "purchaseReceiptNumber": "",\n "ticketCost": {\n "discountMessage": {},\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "purchasePrice": {}\n }\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketLeg": {\n "arrivalDateTime": "",\n "carriage": "",\n "departureDateTime": "",\n "destinationName": {},\n "destinationStationCode": "",\n "fareName": {},\n "originName": {},\n "originStationCode": "",\n "platform": "",\n "ticketSeat": {\n "coach": "",\n "customFareClass": {},\n "fareClass": "",\n "seat": "",\n "seatAssignment": {}\n },\n "ticketSeats": [\n {}\n ],\n "transitOperatorName": {},\n "transitTerminusName": {},\n "zone": ""\n },\n "ticketLegs": [\n {}\n ],\n "ticketNumber": "",\n "ticketRestrictions": {\n "otherRestrictions": {},\n "routeRestrictions": {},\n "routeRestrictionsDetails": {},\n "timeRestrictions": {}\n },\n "ticketStatus": "",\n "tripId": "",\n "tripType": "",\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitObject',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitObject',
headers: {'content-type': 'application/json'},
body: {
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/transitObject');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
activationStatus: {
state: ''
},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {
deviceToken: ''
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {
coach: '',
customFareClass: {},
fareClass: '',
seat: '',
seatAssignment: {}
},
ticketSeats: [
{}
],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [
{}
],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/transitObject',
headers: {'content-type': 'application/json'},
data: {
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitObject';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"activationStatus":{"state":""},"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}},"concessionCategory":"","customConcessionCategory":{},"customTicketStatus":{},"deviceContext":{"deviceToken":""},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerNames":"","passengerType":"","purchaseDetails":{"accountId":"","confirmationCode":"","purchaseDateTime":"","purchaseReceiptNumber":"","ticketCost":{"discountMessage":{},"faceValue":{"currencyCode":"","kind":"","micros":""},"purchasePrice":{}}},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketLeg":{"arrivalDateTime":"","carriage":"","departureDateTime":"","destinationName":{},"destinationStationCode":"","fareName":{},"originName":{},"originStationCode":"","platform":"","ticketSeat":{"coach":"","customFareClass":{},"fareClass":"","seat":"","seatAssignment":{}},"ticketSeats":[{}],"transitOperatorName":{},"transitTerminusName":{},"zone":""},"ticketLegs":[{}],"ticketNumber":"","ticketRestrictions":{"otherRestrictions":{},"routeRestrictions":{},"routeRestrictionsDetails":{},"timeRestrictions":{}},"ticketStatus":"","tripId":"","tripType":"","validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"activationStatus": @{ @"state": @"" },
@"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"activationOptions": @{ @"activationUrl": @"", @"allowReactivation": @NO }, @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"customCarriageLabel": @{ }, @"customCoachLabel": @{ }, @"customConcessionCategoryLabel": @{ }, @"customConfirmationCodeLabel": @{ }, @"customDiscountMessageLabel": @{ }, @"customFareClassLabel": @{ }, @"customFareNameLabel": @{ }, @"customOtherRestrictionsLabel": @{ }, @"customPlatformLabel": @{ }, @"customPurchaseFaceValueLabel": @{ }, @"customPurchasePriceLabel": @{ }, @"customPurchaseReceiptNumberLabel": @{ }, @"customRouteRestrictionsDetailsLabel": @{ }, @"customRouteRestrictionsLabel": @{ }, @"customSeatLabel": @{ }, @"customTicketNumberLabel": @{ }, @"customTimeRestrictionsLabel": @{ }, @"customTransitTerminusNameLabel": @{ }, @"customZoneLabel": @{ }, @"enableSingleLegItinerary": @NO, @"enableSmartTap": @NO, @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"languageOverride": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedIssuerName": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"logo": @{ }, @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"transitOperatorName": @{ }, @"transitType": @"", @"version": @"", @"viewUnlockRequirement": @"", @"watermark": @{ }, @"wordMark": @{ } },
@"concessionCategory": @"",
@"customConcessionCategory": @{ },
@"customTicketStatus": @{ },
@"deviceContext": @{ @"deviceToken": @"" },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"passengerNames": @"",
@"passengerType": @"",
@"purchaseDetails": @{ @"accountId": @"", @"confirmationCode": @"", @"purchaseDateTime": @"", @"purchaseReceiptNumber": @"", @"ticketCost": @{ @"discountMessage": @{ }, @"faceValue": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" }, @"purchasePrice": @{ } } },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"ticketLeg": @{ @"arrivalDateTime": @"", @"carriage": @"", @"departureDateTime": @"", @"destinationName": @{ }, @"destinationStationCode": @"", @"fareName": @{ }, @"originName": @{ }, @"originStationCode": @"", @"platform": @"", @"ticketSeat": @{ @"coach": @"", @"customFareClass": @{ }, @"fareClass": @"", @"seat": @"", @"seatAssignment": @{ } }, @"ticketSeats": @[ @{ } ], @"transitOperatorName": @{ }, @"transitTerminusName": @{ }, @"zone": @"" },
@"ticketLegs": @[ @{ } ],
@"ticketNumber": @"",
@"ticketRestrictions": @{ @"otherRestrictions": @{ }, @"routeRestrictions": @{ }, @"routeRestrictionsDetails": @{ }, @"timeRestrictions": @{ } },
@"ticketStatus": @"",
@"tripId": @"",
@"tripType": @"",
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitObject" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitObject",
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([
'activationStatus' => [
'state' => ''
],
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
],
'concessionCategory' => '',
'customConcessionCategory' => [
],
'customTicketStatus' => [
],
'deviceContext' => [
'deviceToken' => ''
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerNames' => '',
'passengerType' => '',
'purchaseDetails' => [
'accountId' => '',
'confirmationCode' => '',
'purchaseDateTime' => '',
'purchaseReceiptNumber' => '',
'ticketCost' => [
'discountMessage' => [
],
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'purchasePrice' => [
]
]
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketLeg' => [
'arrivalDateTime' => '',
'carriage' => '',
'departureDateTime' => '',
'destinationName' => [
],
'destinationStationCode' => '',
'fareName' => [
],
'originName' => [
],
'originStationCode' => '',
'platform' => '',
'ticketSeat' => [
'coach' => '',
'customFareClass' => [
],
'fareClass' => '',
'seat' => '',
'seatAssignment' => [
]
],
'ticketSeats' => [
[
]
],
'transitOperatorName' => [
],
'transitTerminusName' => [
],
'zone' => ''
],
'ticketLegs' => [
[
]
],
'ticketNumber' => '',
'ticketRestrictions' => [
'otherRestrictions' => [
],
'routeRestrictions' => [
],
'routeRestrictionsDetails' => [
],
'timeRestrictions' => [
]
],
'ticketStatus' => '',
'tripId' => '',
'tripType' => '',
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/transitObject', [
'body' => '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitObject');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'activationStatus' => [
'state' => ''
],
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
],
'concessionCategory' => '',
'customConcessionCategory' => [
],
'customTicketStatus' => [
],
'deviceContext' => [
'deviceToken' => ''
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerNames' => '',
'passengerType' => '',
'purchaseDetails' => [
'accountId' => '',
'confirmationCode' => '',
'purchaseDateTime' => '',
'purchaseReceiptNumber' => '',
'ticketCost' => [
'discountMessage' => [
],
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'purchasePrice' => [
]
]
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketLeg' => [
'arrivalDateTime' => '',
'carriage' => '',
'departureDateTime' => '',
'destinationName' => [
],
'destinationStationCode' => '',
'fareName' => [
],
'originName' => [
],
'originStationCode' => '',
'platform' => '',
'ticketSeat' => [
'coach' => '',
'customFareClass' => [
],
'fareClass' => '',
'seat' => '',
'seatAssignment' => [
]
],
'ticketSeats' => [
[
]
],
'transitOperatorName' => [
],
'transitTerminusName' => [
],
'zone' => ''
],
'ticketLegs' => [
[
]
],
'ticketNumber' => '',
'ticketRestrictions' => [
'otherRestrictions' => [
],
'routeRestrictions' => [
],
'routeRestrictionsDetails' => [
],
'timeRestrictions' => [
]
],
'ticketStatus' => '',
'tripId' => '',
'tripType' => '',
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'activationStatus' => [
'state' => ''
],
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
],
'concessionCategory' => '',
'customConcessionCategory' => [
],
'customTicketStatus' => [
],
'deviceContext' => [
'deviceToken' => ''
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerNames' => '',
'passengerType' => '',
'purchaseDetails' => [
'accountId' => '',
'confirmationCode' => '',
'purchaseDateTime' => '',
'purchaseReceiptNumber' => '',
'ticketCost' => [
'discountMessage' => [
],
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'purchasePrice' => [
]
]
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketLeg' => [
'arrivalDateTime' => '',
'carriage' => '',
'departureDateTime' => '',
'destinationName' => [
],
'destinationStationCode' => '',
'fareName' => [
],
'originName' => [
],
'originStationCode' => '',
'platform' => '',
'ticketSeat' => [
'coach' => '',
'customFareClass' => [
],
'fareClass' => '',
'seat' => '',
'seatAssignment' => [
]
],
'ticketSeats' => [
[
]
],
'transitOperatorName' => [
],
'transitTerminusName' => [
],
'zone' => ''
],
'ticketLegs' => [
[
]
],
'ticketNumber' => '',
'ticketRestrictions' => [
'otherRestrictions' => [
],
'routeRestrictions' => [
],
'routeRestrictionsDetails' => [
],
'timeRestrictions' => [
]
],
'ticketStatus' => '',
'tripId' => '',
'tripType' => '',
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/transitObject');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitObject' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/transitObject", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitObject"
payload = {
"activationStatus": { "state": "" },
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": False
},
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": False,
"enableSmartTap": False,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": { "deviceToken": "" },
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [{}],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [{}],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitObject"
payload <- "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/transitObject') do |req|
req.body = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitObject";
let payload = json!({
"activationStatus": json!({"state": ""}),
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"activationOptions": json!({
"activationUrl": "",
"allowReactivation": false
}),
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"customCarriageLabel": json!({}),
"customCoachLabel": json!({}),
"customConcessionCategoryLabel": json!({}),
"customConfirmationCodeLabel": json!({}),
"customDiscountMessageLabel": json!({}),
"customFareClassLabel": json!({}),
"customFareNameLabel": json!({}),
"customOtherRestrictionsLabel": json!({}),
"customPlatformLabel": json!({}),
"customPurchaseFaceValueLabel": json!({}),
"customPurchasePriceLabel": json!({}),
"customPurchaseReceiptNumberLabel": json!({}),
"customRouteRestrictionsDetailsLabel": json!({}),
"customRouteRestrictionsLabel": json!({}),
"customSeatLabel": json!({}),
"customTicketNumberLabel": json!({}),
"customTimeRestrictionsLabel": json!({}),
"customTransitTerminusNameLabel": json!({}),
"customZoneLabel": json!({}),
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"transitOperatorName": json!({}),
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": json!({}),
"wordMark": json!({})
}),
"concessionCategory": "",
"customConcessionCategory": json!({}),
"customTicketStatus": json!({}),
"deviceContext": json!({"deviceToken": ""}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"passengerNames": "",
"passengerType": "",
"purchaseDetails": json!({
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": json!({
"discountMessage": json!({}),
"faceValue": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"purchasePrice": json!({})
})
}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"ticketLeg": json!({
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": json!({}),
"destinationStationCode": "",
"fareName": json!({}),
"originName": json!({}),
"originStationCode": "",
"platform": "",
"ticketSeat": json!({
"coach": "",
"customFareClass": json!({}),
"fareClass": "",
"seat": "",
"seatAssignment": json!({})
}),
"ticketSeats": (json!({})),
"transitOperatorName": json!({}),
"transitTerminusName": json!({}),
"zone": ""
}),
"ticketLegs": (json!({})),
"ticketNumber": "",
"ticketRestrictions": json!({
"otherRestrictions": json!({}),
"routeRestrictions": json!({}),
"routeRestrictionsDetails": json!({}),
"timeRestrictions": json!({})
}),
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/transitObject \
--header 'content-type: application/json' \
--data '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}'
echo '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}' | \
http POST {{baseUrl}}/walletobjects/v1/transitObject \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "activationStatus": {\n "state": ""\n },\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {},\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n },\n "concessionCategory": "",\n "customConcessionCategory": {},\n "customTicketStatus": {},\n "deviceContext": {\n "deviceToken": ""\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerNames": "",\n "passengerType": "",\n "purchaseDetails": {\n "accountId": "",\n "confirmationCode": "",\n "purchaseDateTime": "",\n "purchaseReceiptNumber": "",\n "ticketCost": {\n "discountMessage": {},\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "purchasePrice": {}\n }\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketLeg": {\n "arrivalDateTime": "",\n "carriage": "",\n "departureDateTime": "",\n "destinationName": {},\n "destinationStationCode": "",\n "fareName": {},\n "originName": {},\n "originStationCode": "",\n "platform": "",\n "ticketSeat": {\n "coach": "",\n "customFareClass": {},\n "fareClass": "",\n "seat": "",\n "seatAssignment": {}\n },\n "ticketSeats": [\n {}\n ],\n "transitOperatorName": {},\n "transitTerminusName": {},\n "zone": ""\n },\n "ticketLegs": [\n {}\n ],\n "ticketNumber": "",\n "ticketRestrictions": {\n "otherRestrictions": {},\n "routeRestrictions": {},\n "routeRestrictionsDetails": {},\n "timeRestrictions": {}\n },\n "ticketStatus": "",\n "tripId": "",\n "tripType": "",\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitObject
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"activationStatus": ["state": ""],
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"activationOptions": [
"activationUrl": "",
"allowReactivation": false
],
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"customCarriageLabel": [],
"customCoachLabel": [],
"customConcessionCategoryLabel": [],
"customConfirmationCodeLabel": [],
"customDiscountMessageLabel": [],
"customFareClassLabel": [],
"customFareNameLabel": [],
"customOtherRestrictionsLabel": [],
"customPlatformLabel": [],
"customPurchaseFaceValueLabel": [],
"customPurchasePriceLabel": [],
"customPurchaseReceiptNumberLabel": [],
"customRouteRestrictionsDetailsLabel": [],
"customRouteRestrictionsLabel": [],
"customSeatLabel": [],
"customTicketNumberLabel": [],
"customTimeRestrictionsLabel": [],
"customTransitTerminusNameLabel": [],
"customZoneLabel": [],
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"transitOperatorName": [],
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": [],
"wordMark": []
],
"concessionCategory": "",
"customConcessionCategory": [],
"customTicketStatus": [],
"deviceContext": ["deviceToken": ""],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"passengerNames": "",
"passengerType": "",
"purchaseDetails": [
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": [
"discountMessage": [],
"faceValue": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"purchasePrice": []
]
],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"ticketLeg": [
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": [],
"destinationStationCode": "",
"fareName": [],
"originName": [],
"originStationCode": "",
"platform": "",
"ticketSeat": [
"coach": "",
"customFareClass": [],
"fareClass": "",
"seat": "",
"seatAssignment": []
],
"ticketSeats": [[]],
"transitOperatorName": [],
"transitTerminusName": [],
"zone": ""
],
"ticketLegs": [[]],
"ticketNumber": "",
"ticketRestrictions": [
"otherRestrictions": [],
"routeRestrictions": [],
"routeRestrictionsDetails": [],
"timeRestrictions": []
],
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
walletobjects.transitobject.list
{{baseUrl}}/walletobjects/v1/transitObject
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitObject");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/walletobjects/v1/transitObject")
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitObject"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitObject"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitObject");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitObject"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/walletobjects/v1/transitObject HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/walletobjects/v1/transitObject")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitObject"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/walletobjects/v1/transitObject")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/walletobjects/v1/transitObject');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitObject',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitObject',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitObject'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/walletobjects/v1/transitObject');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/walletobjects/v1/transitObject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitObject';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitObject"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitObject" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitObject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/walletobjects/v1/transitObject');
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitObject');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/walletobjects/v1/transitObject');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitObject' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitObject' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/walletobjects/v1/transitObject")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitObject"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitObject"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitObject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/walletobjects/v1/transitObject') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitObject";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/walletobjects/v1/transitObject
http GET {{baseUrl}}/walletobjects/v1/transitObject
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitObject
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitObject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
walletobjects.transitobject.patch
{{baseUrl}}/walletobjects/v1/transitObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId" {:content-type :json
:form-params {:activationStatus {:state ""}
:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:activationOptions {:activationUrl ""
:allowReactivation false}
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:customCarriageLabel {}
:customCoachLabel {}
:customConcessionCategoryLabel {}
:customConfirmationCodeLabel {}
:customDiscountMessageLabel {}
:customFareClassLabel {}
:customFareNameLabel {}
:customOtherRestrictionsLabel {}
:customPlatformLabel {}
:customPurchaseFaceValueLabel {}
:customPurchasePriceLabel {}
:customPurchaseReceiptNumberLabel {}
:customRouteRestrictionsDetailsLabel {}
:customRouteRestrictionsLabel {}
:customSeatLabel {}
:customTicketNumberLabel {}
:customTimeRestrictionsLabel {}
:customTransitTerminusNameLabel {}
:customZoneLabel {}
:enableSingleLegItinerary false
:enableSmartTap false
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:transitOperatorName {}
:transitType ""
:version ""
:viewUnlockRequirement ""
:watermark {}
:wordMark {}}
:concessionCategory ""
:customConcessionCategory {}
:customTicketStatus {}
:deviceContext {:deviceToken ""}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{}]
:infoModuleData {}
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:passengerNames ""
:passengerType ""
:purchaseDetails {:accountId ""
:confirmationCode ""
:purchaseDateTime ""
:purchaseReceiptNumber ""
:ticketCost {:discountMessage {}
:faceValue {:currencyCode ""
:kind ""
:micros ""}
:purchasePrice {}}}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:ticketLeg {:arrivalDateTime ""
:carriage ""
:departureDateTime ""
:destinationName {}
:destinationStationCode ""
:fareName {}
:originName {}
:originStationCode ""
:platform ""
:ticketSeat {:coach ""
:customFareClass {}
:fareClass ""
:seat ""
:seatAssignment {}}
:ticketSeats [{}]
:transitOperatorName {}
:transitTerminusName {}
:zone ""}
:ticketLegs [{}]
:ticketNumber ""
:ticketRestrictions {:otherRestrictions {}
:routeRestrictions {}
:routeRestrictionsDetails {}
:timeRestrictions {}}
:ticketStatus ""
:tripId ""
:tripType ""
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"),
Content = new StringContent("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
payload := strings.NewReader("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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(res)
fmt.Println(string(body))
}
PATCH /baseUrl/walletobjects/v1/transitObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6961
{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
activationStatus: {
state: ''
},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {
deviceToken: ''
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {
coach: '',
customFareClass: {},
fareClass: '',
seat: '',
seatAssignment: {}
},
ticketSeats: [
{}
],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [
{}
],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"activationStatus":{"state":""},"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}},"concessionCategory":"","customConcessionCategory":{},"customTicketStatus":{},"deviceContext":{"deviceToken":""},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerNames":"","passengerType":"","purchaseDetails":{"accountId":"","confirmationCode":"","purchaseDateTime":"","purchaseReceiptNumber":"","ticketCost":{"discountMessage":{},"faceValue":{"currencyCode":"","kind":"","micros":""},"purchasePrice":{}}},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketLeg":{"arrivalDateTime":"","carriage":"","departureDateTime":"","destinationName":{},"destinationStationCode":"","fareName":{},"originName":{},"originStationCode":"","platform":"","ticketSeat":{"coach":"","customFareClass":{},"fareClass":"","seat":"","seatAssignment":{}},"ticketSeats":[{}],"transitOperatorName":{},"transitTerminusName":{},"zone":""},"ticketLegs":[{}],"ticketNumber":"","ticketRestrictions":{"otherRestrictions":{},"routeRestrictions":{},"routeRestrictionsDetails":{},"timeRestrictions":{}},"ticketStatus":"","tripId":"","tripType":"","validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "activationStatus": {\n "state": ""\n },\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {},\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n },\n "concessionCategory": "",\n "customConcessionCategory": {},\n "customTicketStatus": {},\n "deviceContext": {\n "deviceToken": ""\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerNames": "",\n "passengerType": "",\n "purchaseDetails": {\n "accountId": "",\n "confirmationCode": "",\n "purchaseDateTime": "",\n "purchaseReceiptNumber": "",\n "ticketCost": {\n "discountMessage": {},\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "purchasePrice": {}\n }\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketLeg": {\n "arrivalDateTime": "",\n "carriage": "",\n "departureDateTime": "",\n "destinationName": {},\n "destinationStationCode": "",\n "fareName": {},\n "originName": {},\n "originStationCode": "",\n "platform": "",\n "ticketSeat": {\n "coach": "",\n "customFareClass": {},\n "fareClass": "",\n "seat": "",\n "seatAssignment": {}\n },\n "ticketSeats": [\n {}\n ],\n "transitOperatorName": {},\n "transitTerminusName": {},\n "zone": ""\n },\n "ticketLegs": [\n {}\n ],\n "ticketNumber": "",\n "ticketRestrictions": {\n "otherRestrictions": {},\n "routeRestrictions": {},\n "routeRestrictionsDetails": {},\n "timeRestrictions": {}\n },\n "ticketStatus": "",\n "tripId": "",\n "tripType": "",\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
activationStatus: {
state: ''
},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {
deviceToken: ''
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {
coach: '',
customFareClass: {},
fareClass: '',
seat: '',
seatAssignment: {}
},
ticketSeats: [
{}
],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [
{}
],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"activationStatus":{"state":""},"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}},"concessionCategory":"","customConcessionCategory":{},"customTicketStatus":{},"deviceContext":{"deviceToken":""},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerNames":"","passengerType":"","purchaseDetails":{"accountId":"","confirmationCode":"","purchaseDateTime":"","purchaseReceiptNumber":"","ticketCost":{"discountMessage":{},"faceValue":{"currencyCode":"","kind":"","micros":""},"purchasePrice":{}}},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketLeg":{"arrivalDateTime":"","carriage":"","departureDateTime":"","destinationName":{},"destinationStationCode":"","fareName":{},"originName":{},"originStationCode":"","platform":"","ticketSeat":{"coach":"","customFareClass":{},"fareClass":"","seat":"","seatAssignment":{}},"ticketSeats":[{}],"transitOperatorName":{},"transitTerminusName":{},"zone":""},"ticketLegs":[{}],"ticketNumber":"","ticketRestrictions":{"otherRestrictions":{},"routeRestrictions":{},"routeRestrictionsDetails":{},"timeRestrictions":{}},"ticketStatus":"","tripId":"","tripType":"","validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"activationStatus": @{ @"state": @"" },
@"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"activationOptions": @{ @"activationUrl": @"", @"allowReactivation": @NO }, @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"customCarriageLabel": @{ }, @"customCoachLabel": @{ }, @"customConcessionCategoryLabel": @{ }, @"customConfirmationCodeLabel": @{ }, @"customDiscountMessageLabel": @{ }, @"customFareClassLabel": @{ }, @"customFareNameLabel": @{ }, @"customOtherRestrictionsLabel": @{ }, @"customPlatformLabel": @{ }, @"customPurchaseFaceValueLabel": @{ }, @"customPurchasePriceLabel": @{ }, @"customPurchaseReceiptNumberLabel": @{ }, @"customRouteRestrictionsDetailsLabel": @{ }, @"customRouteRestrictionsLabel": @{ }, @"customSeatLabel": @{ }, @"customTicketNumberLabel": @{ }, @"customTimeRestrictionsLabel": @{ }, @"customTransitTerminusNameLabel": @{ }, @"customZoneLabel": @{ }, @"enableSingleLegItinerary": @NO, @"enableSmartTap": @NO, @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"languageOverride": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedIssuerName": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"logo": @{ }, @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"transitOperatorName": @{ }, @"transitType": @"", @"version": @"", @"viewUnlockRequirement": @"", @"watermark": @{ }, @"wordMark": @{ } },
@"concessionCategory": @"",
@"customConcessionCategory": @{ },
@"customTicketStatus": @{ },
@"deviceContext": @{ @"deviceToken": @"" },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"passengerNames": @"",
@"passengerType": @"",
@"purchaseDetails": @{ @"accountId": @"", @"confirmationCode": @"", @"purchaseDateTime": @"", @"purchaseReceiptNumber": @"", @"ticketCost": @{ @"discountMessage": @{ }, @"faceValue": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" }, @"purchasePrice": @{ } } },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"ticketLeg": @{ @"arrivalDateTime": @"", @"carriage": @"", @"departureDateTime": @"", @"destinationName": @{ }, @"destinationStationCode": @"", @"fareName": @{ }, @"originName": @{ }, @"originStationCode": @"", @"platform": @"", @"ticketSeat": @{ @"coach": @"", @"customFareClass": @{ }, @"fareClass": @"", @"seat": @"", @"seatAssignment": @{ } }, @"ticketSeats": @[ @{ } ], @"transitOperatorName": @{ }, @"transitTerminusName": @{ }, @"zone": @"" },
@"ticketLegs": @[ @{ } ],
@"ticketNumber": @"",
@"ticketRestrictions": @{ @"otherRestrictions": @{ }, @"routeRestrictions": @{ }, @"routeRestrictionsDetails": @{ }, @"timeRestrictions": @{ } },
@"ticketStatus": @"",
@"tripId": @"",
@"tripType": @"",
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitObject/:resourceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'activationStatus' => [
'state' => ''
],
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
],
'concessionCategory' => '',
'customConcessionCategory' => [
],
'customTicketStatus' => [
],
'deviceContext' => [
'deviceToken' => ''
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerNames' => '',
'passengerType' => '',
'purchaseDetails' => [
'accountId' => '',
'confirmationCode' => '',
'purchaseDateTime' => '',
'purchaseReceiptNumber' => '',
'ticketCost' => [
'discountMessage' => [
],
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'purchasePrice' => [
]
]
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketLeg' => [
'arrivalDateTime' => '',
'carriage' => '',
'departureDateTime' => '',
'destinationName' => [
],
'destinationStationCode' => '',
'fareName' => [
],
'originName' => [
],
'originStationCode' => '',
'platform' => '',
'ticketSeat' => [
'coach' => '',
'customFareClass' => [
],
'fareClass' => '',
'seat' => '',
'seatAssignment' => [
]
],
'ticketSeats' => [
[
]
],
'transitOperatorName' => [
],
'transitTerminusName' => [
],
'zone' => ''
],
'ticketLegs' => [
[
]
],
'ticketNumber' => '',
'ticketRestrictions' => [
'otherRestrictions' => [
],
'routeRestrictions' => [
],
'routeRestrictionsDetails' => [
],
'timeRestrictions' => [
]
],
'ticketStatus' => '',
'tripId' => '',
'tripType' => '',
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PATCH', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId', [
'body' => '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'activationStatus' => [
'state' => ''
],
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
],
'concessionCategory' => '',
'customConcessionCategory' => [
],
'customTicketStatus' => [
],
'deviceContext' => [
'deviceToken' => ''
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerNames' => '',
'passengerType' => '',
'purchaseDetails' => [
'accountId' => '',
'confirmationCode' => '',
'purchaseDateTime' => '',
'purchaseReceiptNumber' => '',
'ticketCost' => [
'discountMessage' => [
],
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'purchasePrice' => [
]
]
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketLeg' => [
'arrivalDateTime' => '',
'carriage' => '',
'departureDateTime' => '',
'destinationName' => [
],
'destinationStationCode' => '',
'fareName' => [
],
'originName' => [
],
'originStationCode' => '',
'platform' => '',
'ticketSeat' => [
'coach' => '',
'customFareClass' => [
],
'fareClass' => '',
'seat' => '',
'seatAssignment' => [
]
],
'ticketSeats' => [
[
]
],
'transitOperatorName' => [
],
'transitTerminusName' => [
],
'zone' => ''
],
'ticketLegs' => [
[
]
],
'ticketNumber' => '',
'ticketRestrictions' => [
'otherRestrictions' => [
],
'routeRestrictions' => [
],
'routeRestrictionsDetails' => [
],
'timeRestrictions' => [
]
],
'ticketStatus' => '',
'tripId' => '',
'tripType' => '',
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'activationStatus' => [
'state' => ''
],
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
],
'concessionCategory' => '',
'customConcessionCategory' => [
],
'customTicketStatus' => [
],
'deviceContext' => [
'deviceToken' => ''
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerNames' => '',
'passengerType' => '',
'purchaseDetails' => [
'accountId' => '',
'confirmationCode' => '',
'purchaseDateTime' => '',
'purchaseReceiptNumber' => '',
'ticketCost' => [
'discountMessage' => [
],
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'purchasePrice' => [
]
]
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketLeg' => [
'arrivalDateTime' => '',
'carriage' => '',
'departureDateTime' => '',
'destinationName' => [
],
'destinationStationCode' => '',
'fareName' => [
],
'originName' => [
],
'originStationCode' => '',
'platform' => '',
'ticketSeat' => [
'coach' => '',
'customFareClass' => [
],
'fareClass' => '',
'seat' => '',
'seatAssignment' => [
]
],
'ticketSeats' => [
[
]
],
'transitOperatorName' => [
],
'transitTerminusName' => [
],
'zone' => ''
],
'ticketLegs' => [
[
]
],
'ticketNumber' => '',
'ticketRestrictions' => [
'otherRestrictions' => [
],
'routeRestrictions' => [
],
'routeRestrictionsDetails' => [
],
'timeRestrictions' => [
]
],
'ticketStatus' => '',
'tripId' => '',
'tripType' => '',
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/walletobjects/v1/transitObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
payload = {
"activationStatus": { "state": "" },
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": False
},
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": False,
"enableSmartTap": False,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": { "deviceToken": "" },
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [{}],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [{}],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
payload <- "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/walletobjects/v1/transitObject/:resourceId') do |req|
req.body = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId";
let payload = json!({
"activationStatus": json!({"state": ""}),
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"activationOptions": json!({
"activationUrl": "",
"allowReactivation": false
}),
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"customCarriageLabel": json!({}),
"customCoachLabel": json!({}),
"customConcessionCategoryLabel": json!({}),
"customConfirmationCodeLabel": json!({}),
"customDiscountMessageLabel": json!({}),
"customFareClassLabel": json!({}),
"customFareNameLabel": json!({}),
"customOtherRestrictionsLabel": json!({}),
"customPlatformLabel": json!({}),
"customPurchaseFaceValueLabel": json!({}),
"customPurchasePriceLabel": json!({}),
"customPurchaseReceiptNumberLabel": json!({}),
"customRouteRestrictionsDetailsLabel": json!({}),
"customRouteRestrictionsLabel": json!({}),
"customSeatLabel": json!({}),
"customTicketNumberLabel": json!({}),
"customTimeRestrictionsLabel": json!({}),
"customTransitTerminusNameLabel": json!({}),
"customZoneLabel": json!({}),
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"transitOperatorName": json!({}),
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": json!({}),
"wordMark": json!({})
}),
"concessionCategory": "",
"customConcessionCategory": json!({}),
"customTicketStatus": json!({}),
"deviceContext": json!({"deviceToken": ""}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"passengerNames": "",
"passengerType": "",
"purchaseDetails": json!({
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": json!({
"discountMessage": json!({}),
"faceValue": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"purchasePrice": json!({})
})
}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"ticketLeg": json!({
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": json!({}),
"destinationStationCode": "",
"fareName": json!({}),
"originName": json!({}),
"originStationCode": "",
"platform": "",
"ticketSeat": json!({
"coach": "",
"customFareClass": json!({}),
"fareClass": "",
"seat": "",
"seatAssignment": json!({})
}),
"ticketSeats": (json!({})),
"transitOperatorName": json!({}),
"transitTerminusName": json!({}),
"zone": ""
}),
"ticketLegs": (json!({})),
"ticketNumber": "",
"ticketRestrictions": json!({
"otherRestrictions": json!({}),
"routeRestrictions": json!({}),
"routeRestrictionsDetails": json!({}),
"timeRestrictions": json!({})
}),
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/walletobjects/v1/transitObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}'
echo '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}' | \
http PATCH {{baseUrl}}/walletobjects/v1/transitObject/:resourceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "activationStatus": {\n "state": ""\n },\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {},\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n },\n "concessionCategory": "",\n "customConcessionCategory": {},\n "customTicketStatus": {},\n "deviceContext": {\n "deviceToken": ""\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerNames": "",\n "passengerType": "",\n "purchaseDetails": {\n "accountId": "",\n "confirmationCode": "",\n "purchaseDateTime": "",\n "purchaseReceiptNumber": "",\n "ticketCost": {\n "discountMessage": {},\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "purchasePrice": {}\n }\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketLeg": {\n "arrivalDateTime": "",\n "carriage": "",\n "departureDateTime": "",\n "destinationName": {},\n "destinationStationCode": "",\n "fareName": {},\n "originName": {},\n "originStationCode": "",\n "platform": "",\n "ticketSeat": {\n "coach": "",\n "customFareClass": {},\n "fareClass": "",\n "seat": "",\n "seatAssignment": {}\n },\n "ticketSeats": [\n {}\n ],\n "transitOperatorName": {},\n "transitTerminusName": {},\n "zone": ""\n },\n "ticketLegs": [\n {}\n ],\n "ticketNumber": "",\n "ticketRestrictions": {\n "otherRestrictions": {},\n "routeRestrictions": {},\n "routeRestrictionsDetails": {},\n "timeRestrictions": {}\n },\n "ticketStatus": "",\n "tripId": "",\n "tripType": "",\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"activationStatus": ["state": ""],
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"activationOptions": [
"activationUrl": "",
"allowReactivation": false
],
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"customCarriageLabel": [],
"customCoachLabel": [],
"customConcessionCategoryLabel": [],
"customConfirmationCodeLabel": [],
"customDiscountMessageLabel": [],
"customFareClassLabel": [],
"customFareNameLabel": [],
"customOtherRestrictionsLabel": [],
"customPlatformLabel": [],
"customPurchaseFaceValueLabel": [],
"customPurchasePriceLabel": [],
"customPurchaseReceiptNumberLabel": [],
"customRouteRestrictionsDetailsLabel": [],
"customRouteRestrictionsLabel": [],
"customSeatLabel": [],
"customTicketNumberLabel": [],
"customTimeRestrictionsLabel": [],
"customTransitTerminusNameLabel": [],
"customZoneLabel": [],
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"transitOperatorName": [],
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": [],
"wordMark": []
],
"concessionCategory": "",
"customConcessionCategory": [],
"customTicketStatus": [],
"deviceContext": ["deviceToken": ""],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"passengerNames": "",
"passengerType": "",
"purchaseDetails": [
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": [
"discountMessage": [],
"faceValue": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"purchasePrice": []
]
],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"ticketLeg": [
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": [],
"destinationStationCode": "",
"fareName": [],
"originName": [],
"originStationCode": "",
"platform": "",
"ticketSeat": [
"coach": "",
"customFareClass": [],
"fareClass": "",
"seat": "",
"seatAssignment": []
],
"ticketSeats": [[]],
"transitOperatorName": [],
"transitTerminusName": [],
"zone": ""
],
"ticketLegs": [[]],
"ticketNumber": "",
"ticketRestrictions": [
"otherRestrictions": [],
"routeRestrictions": [],
"routeRestrictionsDetails": [],
"timeRestrictions": []
],
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
walletobjects.transitobject.update
{{baseUrl}}/walletobjects/v1/transitObject/:resourceId
QUERY PARAMS
resourceId
BODY json
{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId" {:content-type :json
:form-params {:activationStatus {:state ""}
:appLinkData {:androidAppLinkInfo {:appLogoImage {:contentDescription {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:kind ""
:sourceUri {:description ""
:localizedDescription {}
:uri ""}}
:appTarget {:targetUri {:description ""
:id ""
:kind ""
:localizedDescription {}
:uri ""}}
:description {}
:title {}}
:iosAppLinkInfo {}
:webAppLinkInfo {}}
:barcode {:alternateText ""
:kind ""
:renderEncoding ""
:showCodeText {}
:type ""
:value ""}
:classId ""
:classReference {:activationOptions {:activationUrl ""
:allowReactivation false}
:allowMultipleUsersPerObject false
:callbackOptions {:updateRequestUrl ""
:url ""}
:classTemplateInfo {:cardBarcodeSectionDetails {:firstBottomDetail {:fieldSelector {:fields [{:dateFormat ""
:fieldPath ""}]}}
:firstTopDetail {}
:secondTopDetail {}}
:cardTemplateOverride {:cardRowTemplateInfos [{:oneItem {:item {:firstValue {}
:predefinedItem ""
:secondValue {}}}
:threeItems {:endItem {}
:middleItem {}
:startItem {}}
:twoItems {:endItem {}
:startItem {}}}]}
:detailsTemplateOverride {:detailsItemInfos [{:item {}}]}
:listTemplateOverride {:firstRowOption {:fieldOption {}
:transitOption ""}
:secondRowOption {}
:thirdRowOption {}}}
:countryCode ""
:customCarriageLabel {}
:customCoachLabel {}
:customConcessionCategoryLabel {}
:customConfirmationCodeLabel {}
:customDiscountMessageLabel {}
:customFareClassLabel {}
:customFareNameLabel {}
:customOtherRestrictionsLabel {}
:customPlatformLabel {}
:customPurchaseFaceValueLabel {}
:customPurchasePriceLabel {}
:customPurchaseReceiptNumberLabel {}
:customRouteRestrictionsDetailsLabel {}
:customRouteRestrictionsLabel {}
:customSeatLabel {}
:customTicketNumberLabel {}
:customTimeRestrictionsLabel {}
:customTransitTerminusNameLabel {}
:customZoneLabel {}
:enableSingleLegItinerary false
:enableSmartTap false
:heroImage {}
:hexBackgroundColor ""
:homepageUri {}
:id ""
:imageModulesData [{:id ""
:mainImage {}}]
:infoModuleData {:labelValueRows [{:columns [{:label ""
:localizedLabel {}
:localizedValue {}
:value ""}]}]
:showLastUpdateTime false}
:issuerName ""
:languageOverride ""
:linksModuleData {:uris [{}]}
:localizedIssuerName {}
:locations [{:kind ""
:latitude ""
:longitude ""}]
:logo {}
:messages [{:body ""
:displayInterval {:end {:date ""}
:kind ""
:start {}}
:header ""
:id ""
:kind ""
:localizedBody {}
:localizedHeader {}
:messageType ""}]
:multipleDevicesAndHoldersAllowedStatus ""
:redemptionIssuers []
:review {:comments ""}
:reviewStatus ""
:securityAnimation {:animationType ""}
:textModulesData [{:body ""
:header ""
:id ""
:localizedBody {}
:localizedHeader {}}]
:transitOperatorName {}
:transitType ""
:version ""
:viewUnlockRequirement ""
:watermark {}
:wordMark {}}
:concessionCategory ""
:customConcessionCategory {}
:customTicketStatus {}
:deviceContext {:deviceToken ""}
:disableExpirationNotification false
:groupingInfo {:groupingId ""
:sortIndex 0}
:hasLinkedDevice false
:hasUsers false
:heroImage {}
:hexBackgroundColor ""
:id ""
:imageModulesData [{}]
:infoModuleData {}
:linksModuleData {}
:locations [{}]
:messages [{}]
:passConstraints {:screenshotEligibility ""}
:passengerNames ""
:passengerType ""
:purchaseDetails {:accountId ""
:confirmationCode ""
:purchaseDateTime ""
:purchaseReceiptNumber ""
:ticketCost {:discountMessage {}
:faceValue {:currencyCode ""
:kind ""
:micros ""}
:purchasePrice {}}}
:rotatingBarcode {:alternateText ""
:renderEncoding ""
:showCodeText {}
:totpDetails {:algorithm ""
:parameters [{:key ""
:valueLength 0}]
:periodMillis ""}
:type ""
:valuePattern ""}
:smartTapRedemptionValue ""
:state ""
:textModulesData [{}]
:ticketLeg {:arrivalDateTime ""
:carriage ""
:departureDateTime ""
:destinationName {}
:destinationStationCode ""
:fareName {}
:originName {}
:originStationCode ""
:platform ""
:ticketSeat {:coach ""
:customFareClass {}
:fareClass ""
:seat ""
:seatAssignment {}}
:ticketSeats [{}]
:transitOperatorName {}
:transitTerminusName {}
:zone ""}
:ticketLegs [{}]
:ticketNumber ""
:ticketRestrictions {:otherRestrictions {}
:routeRestrictions {}
:routeRestrictionsDetails {}
:timeRestrictions {}}
:ticketStatus ""
:tripId ""
:tripType ""
:validTimeInterval {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"),
Content = new StringContent("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
payload := strings.NewReader("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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(res)
fmt.Println(string(body))
}
PUT /baseUrl/walletobjects/v1/transitObject/:resourceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6961
{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.header("content-type", "application/json")
.body("{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
activationStatus: {
state: ''
},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {
deviceToken: ''
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {
coach: '',
customFareClass: {},
fareClass: '',
seat: '',
seatAssignment: {}
},
ticketSeats: [
{}
],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [
{}
],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"activationStatus":{"state":""},"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}},"concessionCategory":"","customConcessionCategory":{},"customTicketStatus":{},"deviceContext":{"deviceToken":""},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerNames":"","passengerType":"","purchaseDetails":{"accountId":"","confirmationCode":"","purchaseDateTime":"","purchaseReceiptNumber":"","ticketCost":{"discountMessage":{},"faceValue":{"currencyCode":"","kind":"","micros":""},"purchasePrice":{}}},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketLeg":{"arrivalDateTime":"","carriage":"","departureDateTime":"","destinationName":{},"destinationStationCode":"","fareName":{},"originName":{},"originStationCode":"","platform":"","ticketSeat":{"coach":"","customFareClass":{},"fareClass":"","seat":"","seatAssignment":{}},"ticketSeats":[{}],"transitOperatorName":{},"transitTerminusName":{},"zone":""},"ticketLegs":[{}],"ticketNumber":"","ticketRestrictions":{"otherRestrictions":{},"routeRestrictions":{},"routeRestrictionsDetails":{},"timeRestrictions":{}},"ticketStatus":"","tripId":"","tripType":"","validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "activationStatus": {\n "state": ""\n },\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {},\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n },\n "concessionCategory": "",\n "customConcessionCategory": {},\n "customTicketStatus": {},\n "deviceContext": {\n "deviceToken": ""\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerNames": "",\n "passengerType": "",\n "purchaseDetails": {\n "accountId": "",\n "confirmationCode": "",\n "purchaseDateTime": "",\n "purchaseReceiptNumber": "",\n "ticketCost": {\n "discountMessage": {},\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "purchasePrice": {}\n }\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketLeg": {\n "arrivalDateTime": "",\n "carriage": "",\n "departureDateTime": "",\n "destinationName": {},\n "destinationStationCode": "",\n "fareName": {},\n "originName": {},\n "originStationCode": "",\n "platform": "",\n "ticketSeat": {\n "coach": "",\n "customFareClass": {},\n "fareClass": "",\n "seat": "",\n "seatAssignment": {}\n },\n "ticketSeats": [\n {}\n ],\n "transitOperatorName": {},\n "transitTerminusName": {},\n "zone": ""\n },\n "ticketLegs": [\n {}\n ],\n "ticketNumber": "",\n "ticketRestrictions": {\n "otherRestrictions": {},\n "routeRestrictions": {},\n "routeRestrictionsDetails": {},\n "timeRestrictions": {}\n },\n "ticketStatus": "",\n "tripId": "",\n "tripType": "",\n "validTimeInterval": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/transitObject/:resourceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId',
headers: {'content-type': 'application/json'},
body: {
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
activationStatus: {
state: ''
},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
kind: '',
sourceUri: {
description: '',
localizedDescription: {},
uri: ''
}
},
appTarget: {
targetUri: {
description: '',
id: '',
kind: '',
localizedDescription: {},
uri: ''
}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {
activationUrl: '',
allowReactivation: false
},
allowMultipleUsersPerObject: false,
callbackOptions: {
updateRequestUrl: '',
url: ''
},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {
fieldSelector: {
fields: [
{
dateFormat: '',
fieldPath: ''
}
]
}
},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {
item: {
firstValue: {},
predefinedItem: '',
secondValue: {}
}
},
threeItems: {
endItem: {},
middleItem: {},
startItem: {}
},
twoItems: {
endItem: {},
startItem: {}
}
}
]
},
detailsTemplateOverride: {
detailsItemInfos: [
{
item: {}
}
]
},
listTemplateOverride: {
firstRowOption: {
fieldOption: {},
transitOption: ''
},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [
{
id: '',
mainImage: {}
}
],
infoModuleData: {
labelValueRows: [
{
columns: [
{
label: '',
localizedLabel: {},
localizedValue: {},
value: ''
}
]
}
],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {
uris: [
{}
]
},
localizedIssuerName: {},
locations: [
{
kind: '',
latitude: '',
longitude: ''
}
],
logo: {},
messages: [
{
body: '',
displayInterval: {
end: {
date: ''
},
kind: '',
start: {}
},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {
comments: ''
},
reviewStatus: '',
securityAnimation: {
animationType: ''
},
textModulesData: [
{
body: '',
header: '',
id: '',
localizedBody: {},
localizedHeader: {}
}
],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {
deviceToken: ''
},
disableExpirationNotification: false,
groupingInfo: {
groupingId: '',
sortIndex: 0
},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [
{}
],
infoModuleData: {},
linksModuleData: {},
locations: [
{}
],
messages: [
{}
],
passConstraints: {
screenshotEligibility: ''
},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {
currencyCode: '',
kind: '',
micros: ''
},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {
algorithm: '',
parameters: [
{
key: '',
valueLength: 0
}
],
periodMillis: ''
},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [
{}
],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {
coach: '',
customFareClass: {},
fareClass: '',
seat: '',
seatAssignment: {}
},
ticketSeats: [
{}
],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [
{}
],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId',
headers: {'content-type': 'application/json'},
data: {
activationStatus: {state: ''},
appLinkData: {
androidAppLinkInfo: {
appLogoImage: {
contentDescription: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
kind: '',
sourceUri: {description: '', localizedDescription: {}, uri: ''}
},
appTarget: {
targetUri: {description: '', id: '', kind: '', localizedDescription: {}, uri: ''}
},
description: {},
title: {}
},
iosAppLinkInfo: {},
webAppLinkInfo: {}
},
barcode: {
alternateText: '',
kind: '',
renderEncoding: '',
showCodeText: {},
type: '',
value: ''
},
classId: '',
classReference: {
activationOptions: {activationUrl: '', allowReactivation: false},
allowMultipleUsersPerObject: false,
callbackOptions: {updateRequestUrl: '', url: ''},
classTemplateInfo: {
cardBarcodeSectionDetails: {
firstBottomDetail: {fieldSelector: {fields: [{dateFormat: '', fieldPath: ''}]}},
firstTopDetail: {},
secondTopDetail: {}
},
cardTemplateOverride: {
cardRowTemplateInfos: [
{
oneItem: {item: {firstValue: {}, predefinedItem: '', secondValue: {}}},
threeItems: {endItem: {}, middleItem: {}, startItem: {}},
twoItems: {endItem: {}, startItem: {}}
}
]
},
detailsTemplateOverride: {detailsItemInfos: [{item: {}}]},
listTemplateOverride: {
firstRowOption: {fieldOption: {}, transitOption: ''},
secondRowOption: {},
thirdRowOption: {}
}
},
countryCode: '',
customCarriageLabel: {},
customCoachLabel: {},
customConcessionCategoryLabel: {},
customConfirmationCodeLabel: {},
customDiscountMessageLabel: {},
customFareClassLabel: {},
customFareNameLabel: {},
customOtherRestrictionsLabel: {},
customPlatformLabel: {},
customPurchaseFaceValueLabel: {},
customPurchasePriceLabel: {},
customPurchaseReceiptNumberLabel: {},
customRouteRestrictionsDetailsLabel: {},
customRouteRestrictionsLabel: {},
customSeatLabel: {},
customTicketNumberLabel: {},
customTimeRestrictionsLabel: {},
customTransitTerminusNameLabel: {},
customZoneLabel: {},
enableSingleLegItinerary: false,
enableSmartTap: false,
heroImage: {},
hexBackgroundColor: '',
homepageUri: {},
id: '',
imageModulesData: [{id: '', mainImage: {}}],
infoModuleData: {
labelValueRows: [{columns: [{label: '', localizedLabel: {}, localizedValue: {}, value: ''}]}],
showLastUpdateTime: false
},
issuerName: '',
languageOverride: '',
linksModuleData: {uris: [{}]},
localizedIssuerName: {},
locations: [{kind: '', latitude: '', longitude: ''}],
logo: {},
messages: [
{
body: '',
displayInterval: {end: {date: ''}, kind: '', start: {}},
header: '',
id: '',
kind: '',
localizedBody: {},
localizedHeader: {},
messageType: ''
}
],
multipleDevicesAndHoldersAllowedStatus: '',
redemptionIssuers: [],
review: {comments: ''},
reviewStatus: '',
securityAnimation: {animationType: ''},
textModulesData: [{body: '', header: '', id: '', localizedBody: {}, localizedHeader: {}}],
transitOperatorName: {},
transitType: '',
version: '',
viewUnlockRequirement: '',
watermark: {},
wordMark: {}
},
concessionCategory: '',
customConcessionCategory: {},
customTicketStatus: {},
deviceContext: {deviceToken: ''},
disableExpirationNotification: false,
groupingInfo: {groupingId: '', sortIndex: 0},
hasLinkedDevice: false,
hasUsers: false,
heroImage: {},
hexBackgroundColor: '',
id: '',
imageModulesData: [{}],
infoModuleData: {},
linksModuleData: {},
locations: [{}],
messages: [{}],
passConstraints: {screenshotEligibility: ''},
passengerNames: '',
passengerType: '',
purchaseDetails: {
accountId: '',
confirmationCode: '',
purchaseDateTime: '',
purchaseReceiptNumber: '',
ticketCost: {
discountMessage: {},
faceValue: {currencyCode: '', kind: '', micros: ''},
purchasePrice: {}
}
},
rotatingBarcode: {
alternateText: '',
renderEncoding: '',
showCodeText: {},
totpDetails: {algorithm: '', parameters: [{key: '', valueLength: 0}], periodMillis: ''},
type: '',
valuePattern: ''
},
smartTapRedemptionValue: '',
state: '',
textModulesData: [{}],
ticketLeg: {
arrivalDateTime: '',
carriage: '',
departureDateTime: '',
destinationName: {},
destinationStationCode: '',
fareName: {},
originName: {},
originStationCode: '',
platform: '',
ticketSeat: {coach: '', customFareClass: {}, fareClass: '', seat: '', seatAssignment: {}},
ticketSeats: [{}],
transitOperatorName: {},
transitTerminusName: {},
zone: ''
},
ticketLegs: [{}],
ticketNumber: '',
ticketRestrictions: {
otherRestrictions: {},
routeRestrictions: {},
routeRestrictionsDetails: {},
timeRestrictions: {}
},
ticketStatus: '',
tripId: '',
tripType: '',
validTimeInterval: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"activationStatus":{"state":""},"appLinkData":{"androidAppLinkInfo":{"appLogoImage":{"contentDescription":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"kind":"","sourceUri":{"description":"","localizedDescription":{},"uri":""}},"appTarget":{"targetUri":{"description":"","id":"","kind":"","localizedDescription":{},"uri":""}},"description":{},"title":{}},"iosAppLinkInfo":{},"webAppLinkInfo":{}},"barcode":{"alternateText":"","kind":"","renderEncoding":"","showCodeText":{},"type":"","value":""},"classId":"","classReference":{"activationOptions":{"activationUrl":"","allowReactivation":false},"allowMultipleUsersPerObject":false,"callbackOptions":{"updateRequestUrl":"","url":""},"classTemplateInfo":{"cardBarcodeSectionDetails":{"firstBottomDetail":{"fieldSelector":{"fields":[{"dateFormat":"","fieldPath":""}]}},"firstTopDetail":{},"secondTopDetail":{}},"cardTemplateOverride":{"cardRowTemplateInfos":[{"oneItem":{"item":{"firstValue":{},"predefinedItem":"","secondValue":{}}},"threeItems":{"endItem":{},"middleItem":{},"startItem":{}},"twoItems":{"endItem":{},"startItem":{}}}]},"detailsTemplateOverride":{"detailsItemInfos":[{"item":{}}]},"listTemplateOverride":{"firstRowOption":{"fieldOption":{},"transitOption":""},"secondRowOption":{},"thirdRowOption":{}}},"countryCode":"","customCarriageLabel":{},"customCoachLabel":{},"customConcessionCategoryLabel":{},"customConfirmationCodeLabel":{},"customDiscountMessageLabel":{},"customFareClassLabel":{},"customFareNameLabel":{},"customOtherRestrictionsLabel":{},"customPlatformLabel":{},"customPurchaseFaceValueLabel":{},"customPurchasePriceLabel":{},"customPurchaseReceiptNumberLabel":{},"customRouteRestrictionsDetailsLabel":{},"customRouteRestrictionsLabel":{},"customSeatLabel":{},"customTicketNumberLabel":{},"customTimeRestrictionsLabel":{},"customTransitTerminusNameLabel":{},"customZoneLabel":{},"enableSingleLegItinerary":false,"enableSmartTap":false,"heroImage":{},"hexBackgroundColor":"","homepageUri":{},"id":"","imageModulesData":[{"id":"","mainImage":{}}],"infoModuleData":{"labelValueRows":[{"columns":[{"label":"","localizedLabel":{},"localizedValue":{},"value":""}]}],"showLastUpdateTime":false},"issuerName":"","languageOverride":"","linksModuleData":{"uris":[{}]},"localizedIssuerName":{},"locations":[{"kind":"","latitude":"","longitude":""}],"logo":{},"messages":[{"body":"","displayInterval":{"end":{"date":""},"kind":"","start":{}},"header":"","id":"","kind":"","localizedBody":{},"localizedHeader":{},"messageType":""}],"multipleDevicesAndHoldersAllowedStatus":"","redemptionIssuers":[],"review":{"comments":""},"reviewStatus":"","securityAnimation":{"animationType":""},"textModulesData":[{"body":"","header":"","id":"","localizedBody":{},"localizedHeader":{}}],"transitOperatorName":{},"transitType":"","version":"","viewUnlockRequirement":"","watermark":{},"wordMark":{}},"concessionCategory":"","customConcessionCategory":{},"customTicketStatus":{},"deviceContext":{"deviceToken":""},"disableExpirationNotification":false,"groupingInfo":{"groupingId":"","sortIndex":0},"hasLinkedDevice":false,"hasUsers":false,"heroImage":{},"hexBackgroundColor":"","id":"","imageModulesData":[{}],"infoModuleData":{},"linksModuleData":{},"locations":[{}],"messages":[{}],"passConstraints":{"screenshotEligibility":""},"passengerNames":"","passengerType":"","purchaseDetails":{"accountId":"","confirmationCode":"","purchaseDateTime":"","purchaseReceiptNumber":"","ticketCost":{"discountMessage":{},"faceValue":{"currencyCode":"","kind":"","micros":""},"purchasePrice":{}}},"rotatingBarcode":{"alternateText":"","renderEncoding":"","showCodeText":{},"totpDetails":{"algorithm":"","parameters":[{"key":"","valueLength":0}],"periodMillis":""},"type":"","valuePattern":""},"smartTapRedemptionValue":"","state":"","textModulesData":[{}],"ticketLeg":{"arrivalDateTime":"","carriage":"","departureDateTime":"","destinationName":{},"destinationStationCode":"","fareName":{},"originName":{},"originStationCode":"","platform":"","ticketSeat":{"coach":"","customFareClass":{},"fareClass":"","seat":"","seatAssignment":{}},"ticketSeats":[{}],"transitOperatorName":{},"transitTerminusName":{},"zone":""},"ticketLegs":[{}],"ticketNumber":"","ticketRestrictions":{"otherRestrictions":{},"routeRestrictions":{},"routeRestrictionsDetails":{},"timeRestrictions":{}},"ticketStatus":"","tripId":"","tripType":"","validTimeInterval":{},"version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"activationStatus": @{ @"state": @"" },
@"appLinkData": @{ @"androidAppLinkInfo": @{ @"appLogoImage": @{ @"contentDescription": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"kind": @"", @"sourceUri": @{ @"description": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"appTarget": @{ @"targetUri": @{ @"description": @"", @"id": @"", @"kind": @"", @"localizedDescription": @{ }, @"uri": @"" } }, @"description": @{ }, @"title": @{ } }, @"iosAppLinkInfo": @{ }, @"webAppLinkInfo": @{ } },
@"barcode": @{ @"alternateText": @"", @"kind": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"type": @"", @"value": @"" },
@"classId": @"",
@"classReference": @{ @"activationOptions": @{ @"activationUrl": @"", @"allowReactivation": @NO }, @"allowMultipleUsersPerObject": @NO, @"callbackOptions": @{ @"updateRequestUrl": @"", @"url": @"" }, @"classTemplateInfo": @{ @"cardBarcodeSectionDetails": @{ @"firstBottomDetail": @{ @"fieldSelector": @{ @"fields": @[ @{ @"dateFormat": @"", @"fieldPath": @"" } ] } }, @"firstTopDetail": @{ }, @"secondTopDetail": @{ } }, @"cardTemplateOverride": @{ @"cardRowTemplateInfos": @[ @{ @"oneItem": @{ @"item": @{ @"firstValue": @{ }, @"predefinedItem": @"", @"secondValue": @{ } } }, @"threeItems": @{ @"endItem": @{ }, @"middleItem": @{ }, @"startItem": @{ } }, @"twoItems": @{ @"endItem": @{ }, @"startItem": @{ } } } ] }, @"detailsTemplateOverride": @{ @"detailsItemInfos": @[ @{ @"item": @{ } } ] }, @"listTemplateOverride": @{ @"firstRowOption": @{ @"fieldOption": @{ }, @"transitOption": @"" }, @"secondRowOption": @{ }, @"thirdRowOption": @{ } } }, @"countryCode": @"", @"customCarriageLabel": @{ }, @"customCoachLabel": @{ }, @"customConcessionCategoryLabel": @{ }, @"customConfirmationCodeLabel": @{ }, @"customDiscountMessageLabel": @{ }, @"customFareClassLabel": @{ }, @"customFareNameLabel": @{ }, @"customOtherRestrictionsLabel": @{ }, @"customPlatformLabel": @{ }, @"customPurchaseFaceValueLabel": @{ }, @"customPurchasePriceLabel": @{ }, @"customPurchaseReceiptNumberLabel": @{ }, @"customRouteRestrictionsDetailsLabel": @{ }, @"customRouteRestrictionsLabel": @{ }, @"customSeatLabel": @{ }, @"customTicketNumberLabel": @{ }, @"customTimeRestrictionsLabel": @{ }, @"customTransitTerminusNameLabel": @{ }, @"customZoneLabel": @{ }, @"enableSingleLegItinerary": @NO, @"enableSmartTap": @NO, @"heroImage": @{ }, @"hexBackgroundColor": @"", @"homepageUri": @{ }, @"id": @"", @"imageModulesData": @[ @{ @"id": @"", @"mainImage": @{ } } ], @"infoModuleData": @{ @"labelValueRows": @[ @{ @"columns": @[ @{ @"label": @"", @"localizedLabel": @{ }, @"localizedValue": @{ }, @"value": @"" } ] } ], @"showLastUpdateTime": @NO }, @"issuerName": @"", @"languageOverride": @"", @"linksModuleData": @{ @"uris": @[ @{ } ] }, @"localizedIssuerName": @{ }, @"locations": @[ @{ @"kind": @"", @"latitude": @"", @"longitude": @"" } ], @"logo": @{ }, @"messages": @[ @{ @"body": @"", @"displayInterval": @{ @"end": @{ @"date": @"" }, @"kind": @"", @"start": @{ } }, @"header": @"", @"id": @"", @"kind": @"", @"localizedBody": @{ }, @"localizedHeader": @{ }, @"messageType": @"" } ], @"multipleDevicesAndHoldersAllowedStatus": @"", @"redemptionIssuers": @[ ], @"review": @{ @"comments": @"" }, @"reviewStatus": @"", @"securityAnimation": @{ @"animationType": @"" }, @"textModulesData": @[ @{ @"body": @"", @"header": @"", @"id": @"", @"localizedBody": @{ }, @"localizedHeader": @{ } } ], @"transitOperatorName": @{ }, @"transitType": @"", @"version": @"", @"viewUnlockRequirement": @"", @"watermark": @{ }, @"wordMark": @{ } },
@"concessionCategory": @"",
@"customConcessionCategory": @{ },
@"customTicketStatus": @{ },
@"deviceContext": @{ @"deviceToken": @"" },
@"disableExpirationNotification": @NO,
@"groupingInfo": @{ @"groupingId": @"", @"sortIndex": @0 },
@"hasLinkedDevice": @NO,
@"hasUsers": @NO,
@"heroImage": @{ },
@"hexBackgroundColor": @"",
@"id": @"",
@"imageModulesData": @[ @{ } ],
@"infoModuleData": @{ },
@"linksModuleData": @{ },
@"locations": @[ @{ } ],
@"messages": @[ @{ } ],
@"passConstraints": @{ @"screenshotEligibility": @"" },
@"passengerNames": @"",
@"passengerType": @"",
@"purchaseDetails": @{ @"accountId": @"", @"confirmationCode": @"", @"purchaseDateTime": @"", @"purchaseReceiptNumber": @"", @"ticketCost": @{ @"discountMessage": @{ }, @"faceValue": @{ @"currencyCode": @"", @"kind": @"", @"micros": @"" }, @"purchasePrice": @{ } } },
@"rotatingBarcode": @{ @"alternateText": @"", @"renderEncoding": @"", @"showCodeText": @{ }, @"totpDetails": @{ @"algorithm": @"", @"parameters": @[ @{ @"key": @"", @"valueLength": @0 } ], @"periodMillis": @"" }, @"type": @"", @"valuePattern": @"" },
@"smartTapRedemptionValue": @"",
@"state": @"",
@"textModulesData": @[ @{ } ],
@"ticketLeg": @{ @"arrivalDateTime": @"", @"carriage": @"", @"departureDateTime": @"", @"destinationName": @{ }, @"destinationStationCode": @"", @"fareName": @{ }, @"originName": @{ }, @"originStationCode": @"", @"platform": @"", @"ticketSeat": @{ @"coach": @"", @"customFareClass": @{ }, @"fareClass": @"", @"seat": @"", @"seatAssignment": @{ } }, @"ticketSeats": @[ @{ } ], @"transitOperatorName": @{ }, @"transitTerminusName": @{ }, @"zone": @"" },
@"ticketLegs": @[ @{ } ],
@"ticketNumber": @"",
@"ticketRestrictions": @{ @"otherRestrictions": @{ }, @"routeRestrictions": @{ }, @"routeRestrictionsDetails": @{ }, @"timeRestrictions": @{ } },
@"ticketStatus": @"",
@"tripId": @"",
@"tripType": @"",
@"validTimeInterval": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/transitObject/:resourceId",
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([
'activationStatus' => [
'state' => ''
],
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
],
'concessionCategory' => '',
'customConcessionCategory' => [
],
'customTicketStatus' => [
],
'deviceContext' => [
'deviceToken' => ''
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerNames' => '',
'passengerType' => '',
'purchaseDetails' => [
'accountId' => '',
'confirmationCode' => '',
'purchaseDateTime' => '',
'purchaseReceiptNumber' => '',
'ticketCost' => [
'discountMessage' => [
],
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'purchasePrice' => [
]
]
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketLeg' => [
'arrivalDateTime' => '',
'carriage' => '',
'departureDateTime' => '',
'destinationName' => [
],
'destinationStationCode' => '',
'fareName' => [
],
'originName' => [
],
'originStationCode' => '',
'platform' => '',
'ticketSeat' => [
'coach' => '',
'customFareClass' => [
],
'fareClass' => '',
'seat' => '',
'seatAssignment' => [
]
],
'ticketSeats' => [
[
]
],
'transitOperatorName' => [
],
'transitTerminusName' => [
],
'zone' => ''
],
'ticketLegs' => [
[
]
],
'ticketNumber' => '',
'ticketRestrictions' => [
'otherRestrictions' => [
],
'routeRestrictions' => [
],
'routeRestrictionsDetails' => [
],
'timeRestrictions' => [
]
],
'ticketStatus' => '',
'tripId' => '',
'tripType' => '',
'validTimeInterval' => [
],
'version' => ''
]),
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;
}
request('PUT', '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId', [
'body' => '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'activationStatus' => [
'state' => ''
],
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
],
'concessionCategory' => '',
'customConcessionCategory' => [
],
'customTicketStatus' => [
],
'deviceContext' => [
'deviceToken' => ''
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerNames' => '',
'passengerType' => '',
'purchaseDetails' => [
'accountId' => '',
'confirmationCode' => '',
'purchaseDateTime' => '',
'purchaseReceiptNumber' => '',
'ticketCost' => [
'discountMessage' => [
],
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'purchasePrice' => [
]
]
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketLeg' => [
'arrivalDateTime' => '',
'carriage' => '',
'departureDateTime' => '',
'destinationName' => [
],
'destinationStationCode' => '',
'fareName' => [
],
'originName' => [
],
'originStationCode' => '',
'platform' => '',
'ticketSeat' => [
'coach' => '',
'customFareClass' => [
],
'fareClass' => '',
'seat' => '',
'seatAssignment' => [
]
],
'ticketSeats' => [
[
]
],
'transitOperatorName' => [
],
'transitTerminusName' => [
],
'zone' => ''
],
'ticketLegs' => [
[
]
],
'ticketNumber' => '',
'ticketRestrictions' => [
'otherRestrictions' => [
],
'routeRestrictions' => [
],
'routeRestrictionsDetails' => [
],
'timeRestrictions' => [
]
],
'ticketStatus' => '',
'tripId' => '',
'tripType' => '',
'validTimeInterval' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'activationStatus' => [
'state' => ''
],
'appLinkData' => [
'androidAppLinkInfo' => [
'appLogoImage' => [
'contentDescription' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'kind' => '',
'sourceUri' => [
'description' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'appTarget' => [
'targetUri' => [
'description' => '',
'id' => '',
'kind' => '',
'localizedDescription' => [
],
'uri' => ''
]
],
'description' => [
],
'title' => [
]
],
'iosAppLinkInfo' => [
],
'webAppLinkInfo' => [
]
],
'barcode' => [
'alternateText' => '',
'kind' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'type' => '',
'value' => ''
],
'classId' => '',
'classReference' => [
'activationOptions' => [
'activationUrl' => '',
'allowReactivation' => null
],
'allowMultipleUsersPerObject' => null,
'callbackOptions' => [
'updateRequestUrl' => '',
'url' => ''
],
'classTemplateInfo' => [
'cardBarcodeSectionDetails' => [
'firstBottomDetail' => [
'fieldSelector' => [
'fields' => [
[
'dateFormat' => '',
'fieldPath' => ''
]
]
]
],
'firstTopDetail' => [
],
'secondTopDetail' => [
]
],
'cardTemplateOverride' => [
'cardRowTemplateInfos' => [
[
'oneItem' => [
'item' => [
'firstValue' => [
],
'predefinedItem' => '',
'secondValue' => [
]
]
],
'threeItems' => [
'endItem' => [
],
'middleItem' => [
],
'startItem' => [
]
],
'twoItems' => [
'endItem' => [
],
'startItem' => [
]
]
]
]
],
'detailsTemplateOverride' => [
'detailsItemInfos' => [
[
'item' => [
]
]
]
],
'listTemplateOverride' => [
'firstRowOption' => [
'fieldOption' => [
],
'transitOption' => ''
],
'secondRowOption' => [
],
'thirdRowOption' => [
]
]
],
'countryCode' => '',
'customCarriageLabel' => [
],
'customCoachLabel' => [
],
'customConcessionCategoryLabel' => [
],
'customConfirmationCodeLabel' => [
],
'customDiscountMessageLabel' => [
],
'customFareClassLabel' => [
],
'customFareNameLabel' => [
],
'customOtherRestrictionsLabel' => [
],
'customPlatformLabel' => [
],
'customPurchaseFaceValueLabel' => [
],
'customPurchasePriceLabel' => [
],
'customPurchaseReceiptNumberLabel' => [
],
'customRouteRestrictionsDetailsLabel' => [
],
'customRouteRestrictionsLabel' => [
],
'customSeatLabel' => [
],
'customTicketNumberLabel' => [
],
'customTimeRestrictionsLabel' => [
],
'customTransitTerminusNameLabel' => [
],
'customZoneLabel' => [
],
'enableSingleLegItinerary' => null,
'enableSmartTap' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'homepageUri' => [
],
'id' => '',
'imageModulesData' => [
[
'id' => '',
'mainImage' => [
]
]
],
'infoModuleData' => [
'labelValueRows' => [
[
'columns' => [
[
'label' => '',
'localizedLabel' => [
],
'localizedValue' => [
],
'value' => ''
]
]
]
],
'showLastUpdateTime' => null
],
'issuerName' => '',
'languageOverride' => '',
'linksModuleData' => [
'uris' => [
[
]
]
],
'localizedIssuerName' => [
],
'locations' => [
[
'kind' => '',
'latitude' => '',
'longitude' => ''
]
],
'logo' => [
],
'messages' => [
[
'body' => '',
'displayInterval' => [
'end' => [
'date' => ''
],
'kind' => '',
'start' => [
]
],
'header' => '',
'id' => '',
'kind' => '',
'localizedBody' => [
],
'localizedHeader' => [
],
'messageType' => ''
]
],
'multipleDevicesAndHoldersAllowedStatus' => '',
'redemptionIssuers' => [
],
'review' => [
'comments' => ''
],
'reviewStatus' => '',
'securityAnimation' => [
'animationType' => ''
],
'textModulesData' => [
[
'body' => '',
'header' => '',
'id' => '',
'localizedBody' => [
],
'localizedHeader' => [
]
]
],
'transitOperatorName' => [
],
'transitType' => '',
'version' => '',
'viewUnlockRequirement' => '',
'watermark' => [
],
'wordMark' => [
]
],
'concessionCategory' => '',
'customConcessionCategory' => [
],
'customTicketStatus' => [
],
'deviceContext' => [
'deviceToken' => ''
],
'disableExpirationNotification' => null,
'groupingInfo' => [
'groupingId' => '',
'sortIndex' => 0
],
'hasLinkedDevice' => null,
'hasUsers' => null,
'heroImage' => [
],
'hexBackgroundColor' => '',
'id' => '',
'imageModulesData' => [
[
]
],
'infoModuleData' => [
],
'linksModuleData' => [
],
'locations' => [
[
]
],
'messages' => [
[
]
],
'passConstraints' => [
'screenshotEligibility' => ''
],
'passengerNames' => '',
'passengerType' => '',
'purchaseDetails' => [
'accountId' => '',
'confirmationCode' => '',
'purchaseDateTime' => '',
'purchaseReceiptNumber' => '',
'ticketCost' => [
'discountMessage' => [
],
'faceValue' => [
'currencyCode' => '',
'kind' => '',
'micros' => ''
],
'purchasePrice' => [
]
]
],
'rotatingBarcode' => [
'alternateText' => '',
'renderEncoding' => '',
'showCodeText' => [
],
'totpDetails' => [
'algorithm' => '',
'parameters' => [
[
'key' => '',
'valueLength' => 0
]
],
'periodMillis' => ''
],
'type' => '',
'valuePattern' => ''
],
'smartTapRedemptionValue' => '',
'state' => '',
'textModulesData' => [
[
]
],
'ticketLeg' => [
'arrivalDateTime' => '',
'carriage' => '',
'departureDateTime' => '',
'destinationName' => [
],
'destinationStationCode' => '',
'fareName' => [
],
'originName' => [
],
'originStationCode' => '',
'platform' => '',
'ticketSeat' => [
'coach' => '',
'customFareClass' => [
],
'fareClass' => '',
'seat' => '',
'seatAssignment' => [
]
],
'ticketSeats' => [
[
]
],
'transitOperatorName' => [
],
'transitTerminusName' => [
],
'zone' => ''
],
'ticketLegs' => [
[
]
],
'ticketNumber' => '',
'ticketRestrictions' => [
'otherRestrictions' => [
],
'routeRestrictions' => [
],
'routeRestrictionsDetails' => [
],
'timeRestrictions' => [
]
],
'ticketStatus' => '',
'tripId' => '',
'tripType' => '',
'validTimeInterval' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/transitObject/:resourceId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/transitObject/:resourceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/walletobjects/v1/transitObject/:resourceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
payload = {
"activationStatus": { "state": "" },
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": { "targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
} },
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": False
},
"allowMultipleUsersPerObject": False,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": { "fieldSelector": { "fields": [
{
"dateFormat": "",
"fieldPath": ""
}
] } },
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": { "cardRowTemplateInfos": [
{
"oneItem": { "item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
} },
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
] },
"detailsTemplateOverride": { "detailsItemInfos": [{ "item": {} }] },
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": False,
"enableSmartTap": False,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [{ "columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
] }],
"showLastUpdateTime": False
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": { "uris": [{}] },
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": { "date": "" },
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": { "comments": "" },
"reviewStatus": "",
"securityAnimation": { "animationType": "" },
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": { "deviceToken": "" },
"disableExpirationNotification": False,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": False,
"hasUsers": False,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [{}],
"infoModuleData": {},
"linksModuleData": {},
"locations": [{}],
"messages": [{}],
"passConstraints": { "screenshotEligibility": "" },
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [{}],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [{}],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [{}],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId"
payload <- "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/walletobjects/v1/transitObject/:resourceId') do |req|
req.body = "{\n \"activationStatus\": {\n \"state\": \"\"\n },\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appLogoImage\": {\n \"contentDescription\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"kind\": \"\",\n \"sourceUri\": {\n \"description\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"appTarget\": {\n \"targetUri\": {\n \"description\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedDescription\": {},\n \"uri\": \"\"\n }\n },\n \"description\": {},\n \"title\": {}\n },\n \"iosAppLinkInfo\": {},\n \"webAppLinkInfo\": {}\n },\n \"barcode\": {\n \"alternateText\": \"\",\n \"kind\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"type\": \"\",\n \"value\": \"\"\n },\n \"classId\": \"\",\n \"classReference\": {\n \"activationOptions\": {\n \"activationUrl\": \"\",\n \"allowReactivation\": false\n },\n \"allowMultipleUsersPerObject\": false,\n \"callbackOptions\": {\n \"updateRequestUrl\": \"\",\n \"url\": \"\"\n },\n \"classTemplateInfo\": {\n \"cardBarcodeSectionDetails\": {\n \"firstBottomDetail\": {\n \"fieldSelector\": {\n \"fields\": [\n {\n \"dateFormat\": \"\",\n \"fieldPath\": \"\"\n }\n ]\n }\n },\n \"firstTopDetail\": {},\n \"secondTopDetail\": {}\n },\n \"cardTemplateOverride\": {\n \"cardRowTemplateInfos\": [\n {\n \"oneItem\": {\n \"item\": {\n \"firstValue\": {},\n \"predefinedItem\": \"\",\n \"secondValue\": {}\n }\n },\n \"threeItems\": {\n \"endItem\": {},\n \"middleItem\": {},\n \"startItem\": {}\n },\n \"twoItems\": {\n \"endItem\": {},\n \"startItem\": {}\n }\n }\n ]\n },\n \"detailsTemplateOverride\": {\n \"detailsItemInfos\": [\n {\n \"item\": {}\n }\n ]\n },\n \"listTemplateOverride\": {\n \"firstRowOption\": {\n \"fieldOption\": {},\n \"transitOption\": \"\"\n },\n \"secondRowOption\": {},\n \"thirdRowOption\": {}\n }\n },\n \"countryCode\": \"\",\n \"customCarriageLabel\": {},\n \"customCoachLabel\": {},\n \"customConcessionCategoryLabel\": {},\n \"customConfirmationCodeLabel\": {},\n \"customDiscountMessageLabel\": {},\n \"customFareClassLabel\": {},\n \"customFareNameLabel\": {},\n \"customOtherRestrictionsLabel\": {},\n \"customPlatformLabel\": {},\n \"customPurchaseFaceValueLabel\": {},\n \"customPurchasePriceLabel\": {},\n \"customPurchaseReceiptNumberLabel\": {},\n \"customRouteRestrictionsDetailsLabel\": {},\n \"customRouteRestrictionsLabel\": {},\n \"customSeatLabel\": {},\n \"customTicketNumberLabel\": {},\n \"customTimeRestrictionsLabel\": {},\n \"customTransitTerminusNameLabel\": {},\n \"customZoneLabel\": {},\n \"enableSingleLegItinerary\": false,\n \"enableSmartTap\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"homepageUri\": {},\n \"id\": \"\",\n \"imageModulesData\": [\n {\n \"id\": \"\",\n \"mainImage\": {}\n }\n ],\n \"infoModuleData\": {\n \"labelValueRows\": [\n {\n \"columns\": [\n {\n \"label\": \"\",\n \"localizedLabel\": {},\n \"localizedValue\": {},\n \"value\": \"\"\n }\n ]\n }\n ],\n \"showLastUpdateTime\": false\n },\n \"issuerName\": \"\",\n \"languageOverride\": \"\",\n \"linksModuleData\": {\n \"uris\": [\n {}\n ]\n },\n \"localizedIssuerName\": {},\n \"locations\": [\n {\n \"kind\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\"\n }\n ],\n \"logo\": {},\n \"messages\": [\n {\n \"body\": \"\",\n \"displayInterval\": {\n \"end\": {\n \"date\": \"\"\n },\n \"kind\": \"\",\n \"start\": {}\n },\n \"header\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {},\n \"messageType\": \"\"\n }\n ],\n \"multipleDevicesAndHoldersAllowedStatus\": \"\",\n \"redemptionIssuers\": [],\n \"review\": {\n \"comments\": \"\"\n },\n \"reviewStatus\": \"\",\n \"securityAnimation\": {\n \"animationType\": \"\"\n },\n \"textModulesData\": [\n {\n \"body\": \"\",\n \"header\": \"\",\n \"id\": \"\",\n \"localizedBody\": {},\n \"localizedHeader\": {}\n }\n ],\n \"transitOperatorName\": {},\n \"transitType\": \"\",\n \"version\": \"\",\n \"viewUnlockRequirement\": \"\",\n \"watermark\": {},\n \"wordMark\": {}\n },\n \"concessionCategory\": \"\",\n \"customConcessionCategory\": {},\n \"customTicketStatus\": {},\n \"deviceContext\": {\n \"deviceToken\": \"\"\n },\n \"disableExpirationNotification\": false,\n \"groupingInfo\": {\n \"groupingId\": \"\",\n \"sortIndex\": 0\n },\n \"hasLinkedDevice\": false,\n \"hasUsers\": false,\n \"heroImage\": {},\n \"hexBackgroundColor\": \"\",\n \"id\": \"\",\n \"imageModulesData\": [\n {}\n ],\n \"infoModuleData\": {},\n \"linksModuleData\": {},\n \"locations\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"passConstraints\": {\n \"screenshotEligibility\": \"\"\n },\n \"passengerNames\": \"\",\n \"passengerType\": \"\",\n \"purchaseDetails\": {\n \"accountId\": \"\",\n \"confirmationCode\": \"\",\n \"purchaseDateTime\": \"\",\n \"purchaseReceiptNumber\": \"\",\n \"ticketCost\": {\n \"discountMessage\": {},\n \"faceValue\": {\n \"currencyCode\": \"\",\n \"kind\": \"\",\n \"micros\": \"\"\n },\n \"purchasePrice\": {}\n }\n },\n \"rotatingBarcode\": {\n \"alternateText\": \"\",\n \"renderEncoding\": \"\",\n \"showCodeText\": {},\n \"totpDetails\": {\n \"algorithm\": \"\",\n \"parameters\": [\n {\n \"key\": \"\",\n \"valueLength\": 0\n }\n ],\n \"periodMillis\": \"\"\n },\n \"type\": \"\",\n \"valuePattern\": \"\"\n },\n \"smartTapRedemptionValue\": \"\",\n \"state\": \"\",\n \"textModulesData\": [\n {}\n ],\n \"ticketLeg\": {\n \"arrivalDateTime\": \"\",\n \"carriage\": \"\",\n \"departureDateTime\": \"\",\n \"destinationName\": {},\n \"destinationStationCode\": \"\",\n \"fareName\": {},\n \"originName\": {},\n \"originStationCode\": \"\",\n \"platform\": \"\",\n \"ticketSeat\": {\n \"coach\": \"\",\n \"customFareClass\": {},\n \"fareClass\": \"\",\n \"seat\": \"\",\n \"seatAssignment\": {}\n },\n \"ticketSeats\": [\n {}\n ],\n \"transitOperatorName\": {},\n \"transitTerminusName\": {},\n \"zone\": \"\"\n },\n \"ticketLegs\": [\n {}\n ],\n \"ticketNumber\": \"\",\n \"ticketRestrictions\": {\n \"otherRestrictions\": {},\n \"routeRestrictions\": {},\n \"routeRestrictionsDetails\": {},\n \"timeRestrictions\": {}\n },\n \"ticketStatus\": \"\",\n \"tripId\": \"\",\n \"tripType\": \"\",\n \"validTimeInterval\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId";
let payload = json!({
"activationStatus": json!({"state": ""}),
"appLinkData": json!({
"androidAppLinkInfo": json!({
"appLogoImage": json!({
"contentDescription": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"kind": "",
"sourceUri": json!({
"description": "",
"localizedDescription": json!({}),
"uri": ""
})
}),
"appTarget": json!({"targetUri": json!({
"description": "",
"id": "",
"kind": "",
"localizedDescription": json!({}),
"uri": ""
})}),
"description": json!({}),
"title": json!({})
}),
"iosAppLinkInfo": json!({}),
"webAppLinkInfo": json!({})
}),
"barcode": json!({
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": json!({}),
"type": "",
"value": ""
}),
"classId": "",
"classReference": json!({
"activationOptions": json!({
"activationUrl": "",
"allowReactivation": false
}),
"allowMultipleUsersPerObject": false,
"callbackOptions": json!({
"updateRequestUrl": "",
"url": ""
}),
"classTemplateInfo": json!({
"cardBarcodeSectionDetails": json!({
"firstBottomDetail": json!({"fieldSelector": json!({"fields": (
json!({
"dateFormat": "",
"fieldPath": ""
})
)})}),
"firstTopDetail": json!({}),
"secondTopDetail": json!({})
}),
"cardTemplateOverride": json!({"cardRowTemplateInfos": (
json!({
"oneItem": json!({"item": json!({
"firstValue": json!({}),
"predefinedItem": "",
"secondValue": json!({})
})}),
"threeItems": json!({
"endItem": json!({}),
"middleItem": json!({}),
"startItem": json!({})
}),
"twoItems": json!({
"endItem": json!({}),
"startItem": json!({})
})
})
)}),
"detailsTemplateOverride": json!({"detailsItemInfos": (json!({"item": json!({})}))}),
"listTemplateOverride": json!({
"firstRowOption": json!({
"fieldOption": json!({}),
"transitOption": ""
}),
"secondRowOption": json!({}),
"thirdRowOption": json!({})
})
}),
"countryCode": "",
"customCarriageLabel": json!({}),
"customCoachLabel": json!({}),
"customConcessionCategoryLabel": json!({}),
"customConfirmationCodeLabel": json!({}),
"customDiscountMessageLabel": json!({}),
"customFareClassLabel": json!({}),
"customFareNameLabel": json!({}),
"customOtherRestrictionsLabel": json!({}),
"customPlatformLabel": json!({}),
"customPurchaseFaceValueLabel": json!({}),
"customPurchasePriceLabel": json!({}),
"customPurchaseReceiptNumberLabel": json!({}),
"customRouteRestrictionsDetailsLabel": json!({}),
"customRouteRestrictionsLabel": json!({}),
"customSeatLabel": json!({}),
"customTicketNumberLabel": json!({}),
"customTimeRestrictionsLabel": json!({}),
"customTransitTerminusNameLabel": json!({}),
"customZoneLabel": json!({}),
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"homepageUri": json!({}),
"id": "",
"imageModulesData": (
json!({
"id": "",
"mainImage": json!({})
})
),
"infoModuleData": json!({
"labelValueRows": (json!({"columns": (
json!({
"label": "",
"localizedLabel": json!({}),
"localizedValue": json!({}),
"value": ""
})
)})),
"showLastUpdateTime": false
}),
"issuerName": "",
"languageOverride": "",
"linksModuleData": json!({"uris": (json!({}))}),
"localizedIssuerName": json!({}),
"locations": (
json!({
"kind": "",
"latitude": "",
"longitude": ""
})
),
"logo": json!({}),
"messages": (
json!({
"body": "",
"displayInterval": json!({
"end": json!({"date": ""}),
"kind": "",
"start": json!({})
}),
"header": "",
"id": "",
"kind": "",
"localizedBody": json!({}),
"localizedHeader": json!({}),
"messageType": ""
})
),
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": (),
"review": json!({"comments": ""}),
"reviewStatus": "",
"securityAnimation": json!({"animationType": ""}),
"textModulesData": (
json!({
"body": "",
"header": "",
"id": "",
"localizedBody": json!({}),
"localizedHeader": json!({})
})
),
"transitOperatorName": json!({}),
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": json!({}),
"wordMark": json!({})
}),
"concessionCategory": "",
"customConcessionCategory": json!({}),
"customTicketStatus": json!({}),
"deviceContext": json!({"deviceToken": ""}),
"disableExpirationNotification": false,
"groupingInfo": json!({
"groupingId": "",
"sortIndex": 0
}),
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": json!({}),
"hexBackgroundColor": "",
"id": "",
"imageModulesData": (json!({})),
"infoModuleData": json!({}),
"linksModuleData": json!({}),
"locations": (json!({})),
"messages": (json!({})),
"passConstraints": json!({"screenshotEligibility": ""}),
"passengerNames": "",
"passengerType": "",
"purchaseDetails": json!({
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": json!({
"discountMessage": json!({}),
"faceValue": json!({
"currencyCode": "",
"kind": "",
"micros": ""
}),
"purchasePrice": json!({})
})
}),
"rotatingBarcode": json!({
"alternateText": "",
"renderEncoding": "",
"showCodeText": json!({}),
"totpDetails": json!({
"algorithm": "",
"parameters": (
json!({
"key": "",
"valueLength": 0
})
),
"periodMillis": ""
}),
"type": "",
"valuePattern": ""
}),
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": (json!({})),
"ticketLeg": json!({
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": json!({}),
"destinationStationCode": "",
"fareName": json!({}),
"originName": json!({}),
"originStationCode": "",
"platform": "",
"ticketSeat": json!({
"coach": "",
"customFareClass": json!({}),
"fareClass": "",
"seat": "",
"seatAssignment": json!({})
}),
"ticketSeats": (json!({})),
"transitOperatorName": json!({}),
"transitTerminusName": json!({}),
"zone": ""
}),
"ticketLegs": (json!({})),
"ticketNumber": "",
"ticketRestrictions": json!({
"otherRestrictions": json!({}),
"routeRestrictions": json!({}),
"routeRestrictionsDetails": json!({}),
"timeRestrictions": json!({})
}),
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/walletobjects/v1/transitObject/:resourceId \
--header 'content-type: application/json' \
--data '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}'
echo '{
"activationStatus": {
"state": ""
},
"appLinkData": {
"androidAppLinkInfo": {
"appLogoImage": {
"contentDescription": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"kind": "",
"sourceUri": {
"description": "",
"localizedDescription": {},
"uri": ""
}
},
"appTarget": {
"targetUri": {
"description": "",
"id": "",
"kind": "",
"localizedDescription": {},
"uri": ""
}
},
"description": {},
"title": {}
},
"iosAppLinkInfo": {},
"webAppLinkInfo": {}
},
"barcode": {
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": {},
"type": "",
"value": ""
},
"classId": "",
"classReference": {
"activationOptions": {
"activationUrl": "",
"allowReactivation": false
},
"allowMultipleUsersPerObject": false,
"callbackOptions": {
"updateRequestUrl": "",
"url": ""
},
"classTemplateInfo": {
"cardBarcodeSectionDetails": {
"firstBottomDetail": {
"fieldSelector": {
"fields": [
{
"dateFormat": "",
"fieldPath": ""
}
]
}
},
"firstTopDetail": {},
"secondTopDetail": {}
},
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"oneItem": {
"item": {
"firstValue": {},
"predefinedItem": "",
"secondValue": {}
}
},
"threeItems": {
"endItem": {},
"middleItem": {},
"startItem": {}
},
"twoItems": {
"endItem": {},
"startItem": {}
}
}
]
},
"detailsTemplateOverride": {
"detailsItemInfos": [
{
"item": {}
}
]
},
"listTemplateOverride": {
"firstRowOption": {
"fieldOption": {},
"transitOption": ""
},
"secondRowOption": {},
"thirdRowOption": {}
}
},
"countryCode": "",
"customCarriageLabel": {},
"customCoachLabel": {},
"customConcessionCategoryLabel": {},
"customConfirmationCodeLabel": {},
"customDiscountMessageLabel": {},
"customFareClassLabel": {},
"customFareNameLabel": {},
"customOtherRestrictionsLabel": {},
"customPlatformLabel": {},
"customPurchaseFaceValueLabel": {},
"customPurchasePriceLabel": {},
"customPurchaseReceiptNumberLabel": {},
"customRouteRestrictionsDetailsLabel": {},
"customRouteRestrictionsLabel": {},
"customSeatLabel": {},
"customTicketNumberLabel": {},
"customTimeRestrictionsLabel": {},
"customTransitTerminusNameLabel": {},
"customZoneLabel": {},
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": {},
"hexBackgroundColor": "",
"homepageUri": {},
"id": "",
"imageModulesData": [
{
"id": "",
"mainImage": {}
}
],
"infoModuleData": {
"labelValueRows": [
{
"columns": [
{
"label": "",
"localizedLabel": {},
"localizedValue": {},
"value": ""
}
]
}
],
"showLastUpdateTime": false
},
"issuerName": "",
"languageOverride": "",
"linksModuleData": {
"uris": [
{}
]
},
"localizedIssuerName": {},
"locations": [
{
"kind": "",
"latitude": "",
"longitude": ""
}
],
"logo": {},
"messages": [
{
"body": "",
"displayInterval": {
"end": {
"date": ""
},
"kind": "",
"start": {}
},
"header": "",
"id": "",
"kind": "",
"localizedBody": {},
"localizedHeader": {},
"messageType": ""
}
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": {
"comments": ""
},
"reviewStatus": "",
"securityAnimation": {
"animationType": ""
},
"textModulesData": [
{
"body": "",
"header": "",
"id": "",
"localizedBody": {},
"localizedHeader": {}
}
],
"transitOperatorName": {},
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": {},
"wordMark": {}
},
"concessionCategory": "",
"customConcessionCategory": {},
"customTicketStatus": {},
"deviceContext": {
"deviceToken": ""
},
"disableExpirationNotification": false,
"groupingInfo": {
"groupingId": "",
"sortIndex": 0
},
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": {},
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [
{}
],
"infoModuleData": {},
"linksModuleData": {},
"locations": [
{}
],
"messages": [
{}
],
"passConstraints": {
"screenshotEligibility": ""
},
"passengerNames": "",
"passengerType": "",
"purchaseDetails": {
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": {
"discountMessage": {},
"faceValue": {
"currencyCode": "",
"kind": "",
"micros": ""
},
"purchasePrice": {}
}
},
"rotatingBarcode": {
"alternateText": "",
"renderEncoding": "",
"showCodeText": {},
"totpDetails": {
"algorithm": "",
"parameters": [
{
"key": "",
"valueLength": 0
}
],
"periodMillis": ""
},
"type": "",
"valuePattern": ""
},
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [
{}
],
"ticketLeg": {
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": {},
"destinationStationCode": "",
"fareName": {},
"originName": {},
"originStationCode": "",
"platform": "",
"ticketSeat": {
"coach": "",
"customFareClass": {},
"fareClass": "",
"seat": "",
"seatAssignment": {}
},
"ticketSeats": [
{}
],
"transitOperatorName": {},
"transitTerminusName": {},
"zone": ""
},
"ticketLegs": [
{}
],
"ticketNumber": "",
"ticketRestrictions": {
"otherRestrictions": {},
"routeRestrictions": {},
"routeRestrictionsDetails": {},
"timeRestrictions": {}
},
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": {},
"version": ""
}' | \
http PUT {{baseUrl}}/walletobjects/v1/transitObject/:resourceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "activationStatus": {\n "state": ""\n },\n "appLinkData": {\n "androidAppLinkInfo": {\n "appLogoImage": {\n "contentDescription": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "kind": "",\n "sourceUri": {\n "description": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "appTarget": {\n "targetUri": {\n "description": "",\n "id": "",\n "kind": "",\n "localizedDescription": {},\n "uri": ""\n }\n },\n "description": {},\n "title": {}\n },\n "iosAppLinkInfo": {},\n "webAppLinkInfo": {}\n },\n "barcode": {\n "alternateText": "",\n "kind": "",\n "renderEncoding": "",\n "showCodeText": {},\n "type": "",\n "value": ""\n },\n "classId": "",\n "classReference": {\n "activationOptions": {\n "activationUrl": "",\n "allowReactivation": false\n },\n "allowMultipleUsersPerObject": false,\n "callbackOptions": {\n "updateRequestUrl": "",\n "url": ""\n },\n "classTemplateInfo": {\n "cardBarcodeSectionDetails": {\n "firstBottomDetail": {\n "fieldSelector": {\n "fields": [\n {\n "dateFormat": "",\n "fieldPath": ""\n }\n ]\n }\n },\n "firstTopDetail": {},\n "secondTopDetail": {}\n },\n "cardTemplateOverride": {\n "cardRowTemplateInfos": [\n {\n "oneItem": {\n "item": {\n "firstValue": {},\n "predefinedItem": "",\n "secondValue": {}\n }\n },\n "threeItems": {\n "endItem": {},\n "middleItem": {},\n "startItem": {}\n },\n "twoItems": {\n "endItem": {},\n "startItem": {}\n }\n }\n ]\n },\n "detailsTemplateOverride": {\n "detailsItemInfos": [\n {\n "item": {}\n }\n ]\n },\n "listTemplateOverride": {\n "firstRowOption": {\n "fieldOption": {},\n "transitOption": ""\n },\n "secondRowOption": {},\n "thirdRowOption": {}\n }\n },\n "countryCode": "",\n "customCarriageLabel": {},\n "customCoachLabel": {},\n "customConcessionCategoryLabel": {},\n "customConfirmationCodeLabel": {},\n "customDiscountMessageLabel": {},\n "customFareClassLabel": {},\n "customFareNameLabel": {},\n "customOtherRestrictionsLabel": {},\n "customPlatformLabel": {},\n "customPurchaseFaceValueLabel": {},\n "customPurchasePriceLabel": {},\n "customPurchaseReceiptNumberLabel": {},\n "customRouteRestrictionsDetailsLabel": {},\n "customRouteRestrictionsLabel": {},\n "customSeatLabel": {},\n "customTicketNumberLabel": {},\n "customTimeRestrictionsLabel": {},\n "customTransitTerminusNameLabel": {},\n "customZoneLabel": {},\n "enableSingleLegItinerary": false,\n "enableSmartTap": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "homepageUri": {},\n "id": "",\n "imageModulesData": [\n {\n "id": "",\n "mainImage": {}\n }\n ],\n "infoModuleData": {\n "labelValueRows": [\n {\n "columns": [\n {\n "label": "",\n "localizedLabel": {},\n "localizedValue": {},\n "value": ""\n }\n ]\n }\n ],\n "showLastUpdateTime": false\n },\n "issuerName": "",\n "languageOverride": "",\n "linksModuleData": {\n "uris": [\n {}\n ]\n },\n "localizedIssuerName": {},\n "locations": [\n {\n "kind": "",\n "latitude": "",\n "longitude": ""\n }\n ],\n "logo": {},\n "messages": [\n {\n "body": "",\n "displayInterval": {\n "end": {\n "date": ""\n },\n "kind": "",\n "start": {}\n },\n "header": "",\n "id": "",\n "kind": "",\n "localizedBody": {},\n "localizedHeader": {},\n "messageType": ""\n }\n ],\n "multipleDevicesAndHoldersAllowedStatus": "",\n "redemptionIssuers": [],\n "review": {\n "comments": ""\n },\n "reviewStatus": "",\n "securityAnimation": {\n "animationType": ""\n },\n "textModulesData": [\n {\n "body": "",\n "header": "",\n "id": "",\n "localizedBody": {},\n "localizedHeader": {}\n }\n ],\n "transitOperatorName": {},\n "transitType": "",\n "version": "",\n "viewUnlockRequirement": "",\n "watermark": {},\n "wordMark": {}\n },\n "concessionCategory": "",\n "customConcessionCategory": {},\n "customTicketStatus": {},\n "deviceContext": {\n "deviceToken": ""\n },\n "disableExpirationNotification": false,\n "groupingInfo": {\n "groupingId": "",\n "sortIndex": 0\n },\n "hasLinkedDevice": false,\n "hasUsers": false,\n "heroImage": {},\n "hexBackgroundColor": "",\n "id": "",\n "imageModulesData": [\n {}\n ],\n "infoModuleData": {},\n "linksModuleData": {},\n "locations": [\n {}\n ],\n "messages": [\n {}\n ],\n "passConstraints": {\n "screenshotEligibility": ""\n },\n "passengerNames": "",\n "passengerType": "",\n "purchaseDetails": {\n "accountId": "",\n "confirmationCode": "",\n "purchaseDateTime": "",\n "purchaseReceiptNumber": "",\n "ticketCost": {\n "discountMessage": {},\n "faceValue": {\n "currencyCode": "",\n "kind": "",\n "micros": ""\n },\n "purchasePrice": {}\n }\n },\n "rotatingBarcode": {\n "alternateText": "",\n "renderEncoding": "",\n "showCodeText": {},\n "totpDetails": {\n "algorithm": "",\n "parameters": [\n {\n "key": "",\n "valueLength": 0\n }\n ],\n "periodMillis": ""\n },\n "type": "",\n "valuePattern": ""\n },\n "smartTapRedemptionValue": "",\n "state": "",\n "textModulesData": [\n {}\n ],\n "ticketLeg": {\n "arrivalDateTime": "",\n "carriage": "",\n "departureDateTime": "",\n "destinationName": {},\n "destinationStationCode": "",\n "fareName": {},\n "originName": {},\n "originStationCode": "",\n "platform": "",\n "ticketSeat": {\n "coach": "",\n "customFareClass": {},\n "fareClass": "",\n "seat": "",\n "seatAssignment": {}\n },\n "ticketSeats": [\n {}\n ],\n "transitOperatorName": {},\n "transitTerminusName": {},\n "zone": ""\n },\n "ticketLegs": [\n {}\n ],\n "ticketNumber": "",\n "ticketRestrictions": {\n "otherRestrictions": {},\n "routeRestrictions": {},\n "routeRestrictionsDetails": {},\n "timeRestrictions": {}\n },\n "ticketStatus": "",\n "tripId": "",\n "tripType": "",\n "validTimeInterval": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/transitObject/:resourceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"activationStatus": ["state": ""],
"appLinkData": [
"androidAppLinkInfo": [
"appLogoImage": [
"contentDescription": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"kind": "",
"sourceUri": [
"description": "",
"localizedDescription": [],
"uri": ""
]
],
"appTarget": ["targetUri": [
"description": "",
"id": "",
"kind": "",
"localizedDescription": [],
"uri": ""
]],
"description": [],
"title": []
],
"iosAppLinkInfo": [],
"webAppLinkInfo": []
],
"barcode": [
"alternateText": "",
"kind": "",
"renderEncoding": "",
"showCodeText": [],
"type": "",
"value": ""
],
"classId": "",
"classReference": [
"activationOptions": [
"activationUrl": "",
"allowReactivation": false
],
"allowMultipleUsersPerObject": false,
"callbackOptions": [
"updateRequestUrl": "",
"url": ""
],
"classTemplateInfo": [
"cardBarcodeSectionDetails": [
"firstBottomDetail": ["fieldSelector": ["fields": [
[
"dateFormat": "",
"fieldPath": ""
]
]]],
"firstTopDetail": [],
"secondTopDetail": []
],
"cardTemplateOverride": ["cardRowTemplateInfos": [
[
"oneItem": ["item": [
"firstValue": [],
"predefinedItem": "",
"secondValue": []
]],
"threeItems": [
"endItem": [],
"middleItem": [],
"startItem": []
],
"twoItems": [
"endItem": [],
"startItem": []
]
]
]],
"detailsTemplateOverride": ["detailsItemInfos": [["item": []]]],
"listTemplateOverride": [
"firstRowOption": [
"fieldOption": [],
"transitOption": ""
],
"secondRowOption": [],
"thirdRowOption": []
]
],
"countryCode": "",
"customCarriageLabel": [],
"customCoachLabel": [],
"customConcessionCategoryLabel": [],
"customConfirmationCodeLabel": [],
"customDiscountMessageLabel": [],
"customFareClassLabel": [],
"customFareNameLabel": [],
"customOtherRestrictionsLabel": [],
"customPlatformLabel": [],
"customPurchaseFaceValueLabel": [],
"customPurchasePriceLabel": [],
"customPurchaseReceiptNumberLabel": [],
"customRouteRestrictionsDetailsLabel": [],
"customRouteRestrictionsLabel": [],
"customSeatLabel": [],
"customTicketNumberLabel": [],
"customTimeRestrictionsLabel": [],
"customTransitTerminusNameLabel": [],
"customZoneLabel": [],
"enableSingleLegItinerary": false,
"enableSmartTap": false,
"heroImage": [],
"hexBackgroundColor": "",
"homepageUri": [],
"id": "",
"imageModulesData": [
[
"id": "",
"mainImage": []
]
],
"infoModuleData": [
"labelValueRows": [["columns": [
[
"label": "",
"localizedLabel": [],
"localizedValue": [],
"value": ""
]
]]],
"showLastUpdateTime": false
],
"issuerName": "",
"languageOverride": "",
"linksModuleData": ["uris": [[]]],
"localizedIssuerName": [],
"locations": [
[
"kind": "",
"latitude": "",
"longitude": ""
]
],
"logo": [],
"messages": [
[
"body": "",
"displayInterval": [
"end": ["date": ""],
"kind": "",
"start": []
],
"header": "",
"id": "",
"kind": "",
"localizedBody": [],
"localizedHeader": [],
"messageType": ""
]
],
"multipleDevicesAndHoldersAllowedStatus": "",
"redemptionIssuers": [],
"review": ["comments": ""],
"reviewStatus": "",
"securityAnimation": ["animationType": ""],
"textModulesData": [
[
"body": "",
"header": "",
"id": "",
"localizedBody": [],
"localizedHeader": []
]
],
"transitOperatorName": [],
"transitType": "",
"version": "",
"viewUnlockRequirement": "",
"watermark": [],
"wordMark": []
],
"concessionCategory": "",
"customConcessionCategory": [],
"customTicketStatus": [],
"deviceContext": ["deviceToken": ""],
"disableExpirationNotification": false,
"groupingInfo": [
"groupingId": "",
"sortIndex": 0
],
"hasLinkedDevice": false,
"hasUsers": false,
"heroImage": [],
"hexBackgroundColor": "",
"id": "",
"imageModulesData": [[]],
"infoModuleData": [],
"linksModuleData": [],
"locations": [[]],
"messages": [[]],
"passConstraints": ["screenshotEligibility": ""],
"passengerNames": "",
"passengerType": "",
"purchaseDetails": [
"accountId": "",
"confirmationCode": "",
"purchaseDateTime": "",
"purchaseReceiptNumber": "",
"ticketCost": [
"discountMessage": [],
"faceValue": [
"currencyCode": "",
"kind": "",
"micros": ""
],
"purchasePrice": []
]
],
"rotatingBarcode": [
"alternateText": "",
"renderEncoding": "",
"showCodeText": [],
"totpDetails": [
"algorithm": "",
"parameters": [
[
"key": "",
"valueLength": 0
]
],
"periodMillis": ""
],
"type": "",
"valuePattern": ""
],
"smartTapRedemptionValue": "",
"state": "",
"textModulesData": [[]],
"ticketLeg": [
"arrivalDateTime": "",
"carriage": "",
"departureDateTime": "",
"destinationName": [],
"destinationStationCode": "",
"fareName": [],
"originName": [],
"originStationCode": "",
"platform": "",
"ticketSeat": [
"coach": "",
"customFareClass": [],
"fareClass": "",
"seat": "",
"seatAssignment": []
],
"ticketSeats": [[]],
"transitOperatorName": [],
"transitTerminusName": [],
"zone": ""
],
"ticketLegs": [[]],
"ticketNumber": "",
"ticketRestrictions": [
"otherRestrictions": [],
"routeRestrictions": [],
"routeRestrictionsDetails": [],
"timeRestrictions": []
],
"ticketStatus": "",
"tripId": "",
"tripType": "",
"validTimeInterval": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/transitObject/:resourceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
walletobjects.walletobjects.v1.privateContent.uploadPrivateData
{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData
BODY json
{
"issuerId": "",
"text": {
"body": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"header": {}
},
"uri": {
"description": {},
"uri": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData" {:content-type :json
:form-params {:issuerId ""
:text {:body {:defaultValue {:kind ""
:language ""
:value ""}
:kind ""
:translatedValues [{}]}
:header {}}
:uri {:description {}
:uri ""}}})
require "http/client"
url = "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData"),
Content = new StringContent("{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData"
payload := strings.NewReader("{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\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(res)
fmt.Println(string(body))
}
POST /baseUrl/walletobjects/v1/privateContent/uploadPrivateData HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 290
{
"issuerId": "",
"text": {
"body": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"header": {}
},
"uri": {
"description": {},
"uri": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData")
.setHeader("content-type", "application/json")
.setBody("{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData")
.header("content-type", "application/json")
.body("{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
issuerId: '',
text: {
body: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
header: {}
},
uri: {
description: {},
uri: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData',
headers: {'content-type': 'application/json'},
data: {
issuerId: '',
text: {
body: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
header: {}
},
uri: {description: {}, uri: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"issuerId":"","text":{"body":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"header":{}},"uri":{"description":{},"uri":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "issuerId": "",\n "text": {\n "body": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "header": {}\n },\n "uri": {\n "description": {},\n "uri": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/walletobjects/v1/privateContent/uploadPrivateData',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
issuerId: '',
text: {
body: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
header: {}
},
uri: {description: {}, uri: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData',
headers: {'content-type': 'application/json'},
body: {
issuerId: '',
text: {
body: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
header: {}
},
uri: {description: {}, uri: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
issuerId: '',
text: {
body: {
defaultValue: {
kind: '',
language: '',
value: ''
},
kind: '',
translatedValues: [
{}
]
},
header: {}
},
uri: {
description: {},
uri: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData',
headers: {'content-type': 'application/json'},
data: {
issuerId: '',
text: {
body: {
defaultValue: {kind: '', language: '', value: ''},
kind: '',
translatedValues: [{}]
},
header: {}
},
uri: {description: {}, uri: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"issuerId":"","text":{"body":{"defaultValue":{"kind":"","language":"","value":""},"kind":"","translatedValues":[{}]},"header":{}},"uri":{"description":{},"uri":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"issuerId": @"",
@"text": @{ @"body": @{ @"defaultValue": @{ @"kind": @"", @"language": @"", @"value": @"" }, @"kind": @"", @"translatedValues": @[ @{ } ] }, @"header": @{ } },
@"uri": @{ @"description": @{ }, @"uri": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData",
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([
'issuerId' => '',
'text' => [
'body' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'header' => [
]
],
'uri' => [
'description' => [
],
'uri' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData', [
'body' => '{
"issuerId": "",
"text": {
"body": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"header": {}
},
"uri": {
"description": {},
"uri": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'issuerId' => '',
'text' => [
'body' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'header' => [
]
],
'uri' => [
'description' => [
],
'uri' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'issuerId' => '',
'text' => [
'body' => [
'defaultValue' => [
'kind' => '',
'language' => '',
'value' => ''
],
'kind' => '',
'translatedValues' => [
[
]
]
],
'header' => [
]
],
'uri' => [
'description' => [
],
'uri' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"issuerId": "",
"text": {
"body": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"header": {}
},
"uri": {
"description": {},
"uri": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"issuerId": "",
"text": {
"body": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"header": {}
},
"uri": {
"description": {},
"uri": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/walletobjects/v1/privateContent/uploadPrivateData", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData"
payload = {
"issuerId": "",
"text": {
"body": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [{}]
},
"header": {}
},
"uri": {
"description": {},
"uri": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData"
payload <- "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/walletobjects/v1/privateContent/uploadPrivateData') do |req|
req.body = "{\n \"issuerId\": \"\",\n \"text\": {\n \"body\": {\n \"defaultValue\": {\n \"kind\": \"\",\n \"language\": \"\",\n \"value\": \"\"\n },\n \"kind\": \"\",\n \"translatedValues\": [\n {}\n ]\n },\n \"header\": {}\n },\n \"uri\": {\n \"description\": {},\n \"uri\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData";
let payload = json!({
"issuerId": "",
"text": json!({
"body": json!({
"defaultValue": json!({
"kind": "",
"language": "",
"value": ""
}),
"kind": "",
"translatedValues": (json!({}))
}),
"header": json!({})
}),
"uri": json!({
"description": json!({}),
"uri": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData \
--header 'content-type: application/json' \
--data '{
"issuerId": "",
"text": {
"body": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"header": {}
},
"uri": {
"description": {},
"uri": ""
}
}'
echo '{
"issuerId": "",
"text": {
"body": {
"defaultValue": {
"kind": "",
"language": "",
"value": ""
},
"kind": "",
"translatedValues": [
{}
]
},
"header": {}
},
"uri": {
"description": {},
"uri": ""
}
}' | \
http POST {{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "issuerId": "",\n "text": {\n "body": {\n "defaultValue": {\n "kind": "",\n "language": "",\n "value": ""\n },\n "kind": "",\n "translatedValues": [\n {}\n ]\n },\n "header": {}\n },\n "uri": {\n "description": {},\n "uri": ""\n }\n}' \
--output-document \
- {{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"issuerId": "",
"text": [
"body": [
"defaultValue": [
"kind": "",
"language": "",
"value": ""
],
"kind": "",
"translatedValues": [[]]
],
"header": []
],
"uri": [
"description": [],
"uri": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/walletobjects/v1/privateContent/uploadPrivateData")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()